proteus  1.7.4
C/C++/Fortran libraries
cmeshTools.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.16 */
2 
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6  #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
8  #error Cython requires Python 2.6+ or Python 3.3+.
9 #else
10 #define CYTHON_ABI "0_29_16"
11 #define CYTHON_HEX_VERSION 0x001D10F0
12 #define CYTHON_FUTURE_DIVISION 0
13 #include <stddef.h>
14 #ifndef offsetof
15  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
16 #endif
17 #if !defined(WIN32) && !defined(MS_WINDOWS)
18  #ifndef __stdcall
19  #define __stdcall
20  #endif
21  #ifndef __cdecl
22  #define __cdecl
23  #endif
24  #ifndef __fastcall
25  #define __fastcall
26  #endif
27 #endif
28 #ifndef DL_IMPORT
29  #define DL_IMPORT(t) t
30 #endif
31 #ifndef DL_EXPORT
32  #define DL_EXPORT(t) t
33 #endif
34 #define __PYX_COMMA ,
35 #ifndef HAVE_LONG_LONG
36  #if PY_VERSION_HEX >= 0x02070000
37  #define HAVE_LONG_LONG
38  #endif
39 #endif
40 #ifndef PY_LONG_LONG
41  #define PY_LONG_LONG LONG_LONG
42 #endif
43 #ifndef Py_HUGE_VAL
44  #define Py_HUGE_VAL HUGE_VAL
45 #endif
46 #ifdef PYPY_VERSION
47  #define CYTHON_COMPILING_IN_PYPY 1
48  #define CYTHON_COMPILING_IN_PYSTON 0
49  #define CYTHON_COMPILING_IN_CPYTHON 0
50  #undef CYTHON_USE_TYPE_SLOTS
51  #define CYTHON_USE_TYPE_SLOTS 0
52  #undef CYTHON_USE_PYTYPE_LOOKUP
53  #define CYTHON_USE_PYTYPE_LOOKUP 0
54  #if PY_VERSION_HEX < 0x03050000
55  #undef CYTHON_USE_ASYNC_SLOTS
56  #define CYTHON_USE_ASYNC_SLOTS 0
57  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
58  #define CYTHON_USE_ASYNC_SLOTS 1
59  #endif
60  #undef CYTHON_USE_PYLIST_INTERNALS
61  #define CYTHON_USE_PYLIST_INTERNALS 0
62  #undef CYTHON_USE_UNICODE_INTERNALS
63  #define CYTHON_USE_UNICODE_INTERNALS 0
64  #undef CYTHON_USE_UNICODE_WRITER
65  #define CYTHON_USE_UNICODE_WRITER 0
66  #undef CYTHON_USE_PYLONG_INTERNALS
67  #define CYTHON_USE_PYLONG_INTERNALS 0
68  #undef CYTHON_AVOID_BORROWED_REFS
69  #define CYTHON_AVOID_BORROWED_REFS 1
70  #undef CYTHON_ASSUME_SAFE_MACROS
71  #define CYTHON_ASSUME_SAFE_MACROS 0
72  #undef CYTHON_UNPACK_METHODS
73  #define CYTHON_UNPACK_METHODS 0
74  #undef CYTHON_FAST_THREAD_STATE
75  #define CYTHON_FAST_THREAD_STATE 0
76  #undef CYTHON_FAST_PYCALL
77  #define CYTHON_FAST_PYCALL 0
78  #undef CYTHON_PEP489_MULTI_PHASE_INIT
79  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
80  #undef CYTHON_USE_TP_FINALIZE
81  #define CYTHON_USE_TP_FINALIZE 0
82  #undef CYTHON_USE_DICT_VERSIONS
83  #define CYTHON_USE_DICT_VERSIONS 0
84  #undef CYTHON_USE_EXC_INFO_STACK
85  #define CYTHON_USE_EXC_INFO_STACK 0
86 #elif defined(PYSTON_VERSION)
87  #define CYTHON_COMPILING_IN_PYPY 0
88  #define CYTHON_COMPILING_IN_PYSTON 1
89  #define CYTHON_COMPILING_IN_CPYTHON 0
90  #ifndef CYTHON_USE_TYPE_SLOTS
91  #define CYTHON_USE_TYPE_SLOTS 1
92  #endif
93  #undef CYTHON_USE_PYTYPE_LOOKUP
94  #define CYTHON_USE_PYTYPE_LOOKUP 0
95  #undef CYTHON_USE_ASYNC_SLOTS
96  #define CYTHON_USE_ASYNC_SLOTS 0
97  #undef CYTHON_USE_PYLIST_INTERNALS
98  #define CYTHON_USE_PYLIST_INTERNALS 0
99  #ifndef CYTHON_USE_UNICODE_INTERNALS
100  #define CYTHON_USE_UNICODE_INTERNALS 1
101  #endif
102  #undef CYTHON_USE_UNICODE_WRITER
103  #define CYTHON_USE_UNICODE_WRITER 0
104  #undef CYTHON_USE_PYLONG_INTERNALS
105  #define CYTHON_USE_PYLONG_INTERNALS 0
106  #ifndef CYTHON_AVOID_BORROWED_REFS
107  #define CYTHON_AVOID_BORROWED_REFS 0
108  #endif
109  #ifndef CYTHON_ASSUME_SAFE_MACROS
110  #define CYTHON_ASSUME_SAFE_MACROS 1
111  #endif
112  #ifndef CYTHON_UNPACK_METHODS
113  #define CYTHON_UNPACK_METHODS 1
114  #endif
115  #undef CYTHON_FAST_THREAD_STATE
116  #define CYTHON_FAST_THREAD_STATE 0
117  #undef CYTHON_FAST_PYCALL
118  #define CYTHON_FAST_PYCALL 0
119  #undef CYTHON_PEP489_MULTI_PHASE_INIT
120  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
121  #undef CYTHON_USE_TP_FINALIZE
122  #define CYTHON_USE_TP_FINALIZE 0
123  #undef CYTHON_USE_DICT_VERSIONS
124  #define CYTHON_USE_DICT_VERSIONS 0
125  #undef CYTHON_USE_EXC_INFO_STACK
126  #define CYTHON_USE_EXC_INFO_STACK 0
127 #else
128  #define CYTHON_COMPILING_IN_PYPY 0
129  #define CYTHON_COMPILING_IN_PYSTON 0
130  #define CYTHON_COMPILING_IN_CPYTHON 1
131  #ifndef CYTHON_USE_TYPE_SLOTS
132  #define CYTHON_USE_TYPE_SLOTS 1
133  #endif
134  #if PY_VERSION_HEX < 0x02070000
135  #undef CYTHON_USE_PYTYPE_LOOKUP
136  #define CYTHON_USE_PYTYPE_LOOKUP 0
137  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
138  #define CYTHON_USE_PYTYPE_LOOKUP 1
139  #endif
140  #if PY_MAJOR_VERSION < 3
141  #undef CYTHON_USE_ASYNC_SLOTS
142  #define CYTHON_USE_ASYNC_SLOTS 0
143  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
144  #define CYTHON_USE_ASYNC_SLOTS 1
145  #endif
146  #if PY_VERSION_HEX < 0x02070000
147  #undef CYTHON_USE_PYLONG_INTERNALS
148  #define CYTHON_USE_PYLONG_INTERNALS 0
149  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
150  #define CYTHON_USE_PYLONG_INTERNALS 1
151  #endif
152  #ifndef CYTHON_USE_PYLIST_INTERNALS
153  #define CYTHON_USE_PYLIST_INTERNALS 1
154  #endif
155  #ifndef CYTHON_USE_UNICODE_INTERNALS
156  #define CYTHON_USE_UNICODE_INTERNALS 1
157  #endif
158  #if PY_VERSION_HEX < 0x030300F0
159  #undef CYTHON_USE_UNICODE_WRITER
160  #define CYTHON_USE_UNICODE_WRITER 0
161  #elif !defined(CYTHON_USE_UNICODE_WRITER)
162  #define CYTHON_USE_UNICODE_WRITER 1
163  #endif
164  #ifndef CYTHON_AVOID_BORROWED_REFS
165  #define CYTHON_AVOID_BORROWED_REFS 0
166  #endif
167  #ifndef CYTHON_ASSUME_SAFE_MACROS
168  #define CYTHON_ASSUME_SAFE_MACROS 1
169  #endif
170  #ifndef CYTHON_UNPACK_METHODS
171  #define CYTHON_UNPACK_METHODS 1
172  #endif
173  #ifndef CYTHON_FAST_THREAD_STATE
174  #define CYTHON_FAST_THREAD_STATE 1
175  #endif
176  #ifndef CYTHON_FAST_PYCALL
177  #define CYTHON_FAST_PYCALL 1
178  #endif
179  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
180  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
181  #endif
182  #ifndef CYTHON_USE_TP_FINALIZE
183  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
184  #endif
185  #ifndef CYTHON_USE_DICT_VERSIONS
186  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
187  #endif
188  #ifndef CYTHON_USE_EXC_INFO_STACK
189  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
190  #endif
191 #endif
192 #if !defined(CYTHON_FAST_PYCCALL)
193 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
194 #endif
195 #if CYTHON_USE_PYLONG_INTERNALS
196  #include "longintrepr.h"
197  #undef SHIFT
198  #undef BASE
199  #undef MASK
200  #ifdef SIZEOF_VOID_P
201  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
202  #endif
203 #endif
204 #ifndef __has_attribute
205  #define __has_attribute(x) 0
206 #endif
207 #ifndef __has_cpp_attribute
208  #define __has_cpp_attribute(x) 0
209 #endif
210 #ifndef CYTHON_RESTRICT
211  #if defined(__GNUC__)
212  #define CYTHON_RESTRICT __restrict__
213  #elif defined(_MSC_VER) && _MSC_VER >= 1400
214  #define CYTHON_RESTRICT __restrict
215  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
216  #define CYTHON_RESTRICT restrict
217  #else
218  #define CYTHON_RESTRICT
219  #endif
220 #endif
221 #ifndef CYTHON_UNUSED
222 # if defined(__GNUC__)
223 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
224 # define CYTHON_UNUSED __attribute__ ((__unused__))
225 # else
226 # define CYTHON_UNUSED
227 # endif
228 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
229 # define CYTHON_UNUSED __attribute__ ((__unused__))
230 # else
231 # define CYTHON_UNUSED
232 # endif
233 #endif
234 #ifndef CYTHON_MAYBE_UNUSED_VAR
235 # if defined(__cplusplus)
236  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
237 # else
238 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
239 # endif
240 #endif
241 #ifndef CYTHON_NCP_UNUSED
242 # if CYTHON_COMPILING_IN_CPYTHON
243 # define CYTHON_NCP_UNUSED
244 # else
245 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
246 # endif
247 #endif
248 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
249 #ifdef _MSC_VER
250  #ifndef _MSC_STDINT_H_
251  #if _MSC_VER < 1300
252  typedef unsigned char uint8_t;
253  typedef unsigned int uint32_t;
254  #else
255  typedef unsigned __int8 uint8_t;
256  typedef unsigned __int32 uint32_t;
257  #endif
258  #endif
259 #else
260  #include <stdint.h>
261 #endif
262 #ifndef CYTHON_FALLTHROUGH
263  #if defined(__cplusplus) && __cplusplus >= 201103L
264  #if __has_cpp_attribute(fallthrough)
265  #define CYTHON_FALLTHROUGH [[fallthrough]]
266  #elif __has_cpp_attribute(clang::fallthrough)
267  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
268  #elif __has_cpp_attribute(gnu::fallthrough)
269  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
270  #endif
271  #endif
272  #ifndef CYTHON_FALLTHROUGH
273  #if __has_attribute(fallthrough)
274  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
275  #else
276  #define CYTHON_FALLTHROUGH
277  #endif
278  #endif
279  #if defined(__clang__ ) && defined(__apple_build_version__)
280  #if __apple_build_version__ < 7000000
281  #undef CYTHON_FALLTHROUGH
282  #define CYTHON_FALLTHROUGH
283  #endif
284  #endif
285 #endif
286 
287 #ifndef __cplusplus
288  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
289 #endif
290 #ifndef CYTHON_INLINE
291  #if defined(__clang__)
292  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
293  #else
294  #define CYTHON_INLINE inline
295  #endif
296 #endif
297 template<typename T>
298 void __Pyx_call_destructor(T& x) {
299  x.~T();
300 }
301 template<typename T>
302 class __Pyx_FakeReference {
303  public:
304  __Pyx_FakeReference() : ptr(NULL) { }
305  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
306  T *operator->() { return ptr; }
307  T *operator&() { return ptr; }
308  operator T&() { return *ptr; }
309  template<typename U> bool operator ==(U other) { return *ptr == other; }
310  template<typename U> bool operator !=(U other) { return *ptr != other; }
311  private:
312  T *ptr;
313 };
314 
315 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
316  #define Py_OptimizeFlag 0
317 #endif
318 #define __PYX_BUILD_PY_SSIZE_T "n"
319 #define CYTHON_FORMAT_SSIZE_T "z"
320 #if PY_MAJOR_VERSION < 3
321  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
322  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
323  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
324  #define __Pyx_DefaultClassType PyClass_Type
325 #else
326  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
327 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
328  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
329  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
330 #else
331  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
332  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
333 #endif
334  #define __Pyx_DefaultClassType PyType_Type
335 #endif
336 #ifndef Py_TPFLAGS_CHECKTYPES
337  #define Py_TPFLAGS_CHECKTYPES 0
338 #endif
339 #ifndef Py_TPFLAGS_HAVE_INDEX
340  #define Py_TPFLAGS_HAVE_INDEX 0
341 #endif
342 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
343  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
344 #endif
345 #ifndef Py_TPFLAGS_HAVE_FINALIZE
346  #define Py_TPFLAGS_HAVE_FINALIZE 0
347 #endif
348 #ifndef METH_STACKLESS
349  #define METH_STACKLESS 0
350 #endif
351 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
352  #ifndef METH_FASTCALL
353  #define METH_FASTCALL 0x80
354  #endif
355  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
356  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
357  Py_ssize_t nargs, PyObject *kwnames);
358 #else
359  #define __Pyx_PyCFunctionFast _PyCFunctionFast
360  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
361 #endif
362 #if CYTHON_FAST_PYCCALL
363 #define __Pyx_PyFastCFunction_Check(func)\
364  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
365 #else
366 #define __Pyx_PyFastCFunction_Check(func) 0
367 #endif
368 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
369  #define PyObject_Malloc(s) PyMem_Malloc(s)
370  #define PyObject_Free(p) PyMem_Free(p)
371  #define PyObject_Realloc(p) PyMem_Realloc(p)
372 #endif
373 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
374  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
375  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
376  #define PyMem_RawFree(p) PyMem_Free(p)
377 #endif
378 #if CYTHON_COMPILING_IN_PYSTON
379  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
380  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
381 #else
382  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
383  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
384 #endif
385 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
386  #define __Pyx_PyThreadState_Current PyThreadState_GET()
387 #elif PY_VERSION_HEX >= 0x03060000
388  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
389 #elif PY_VERSION_HEX >= 0x03000000
390  #define __Pyx_PyThreadState_Current PyThreadState_GET()
391 #else
392  #define __Pyx_PyThreadState_Current _PyThreadState_Current
393 #endif
394 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
395 #include "pythread.h"
396 #define Py_tss_NEEDS_INIT 0
397 typedef int Py_tss_t;
398 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
399  *key = PyThread_create_key();
400  return 0;
401 }
402 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
403  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
404  *key = Py_tss_NEEDS_INIT;
405  return key;
406 }
407 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
408  PyObject_Free(key);
409 }
410 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
411  return *key != Py_tss_NEEDS_INIT;
412 }
413 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
414  PyThread_delete_key(*key);
415  *key = Py_tss_NEEDS_INIT;
416 }
417 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
418  return PyThread_set_key_value(*key, value);
419 }
420 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
421  return PyThread_get_key_value(*key);
422 }
423 #endif
424 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
425 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
426 #else
427 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
428 #endif
429 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
430  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
431  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
432 #else
433  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
434  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
435 #endif
436 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
437 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
438 #else
439 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
440 #endif
441 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
442  #define CYTHON_PEP393_ENABLED 1
443  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
444  0 : _PyUnicode_Ready((PyObject *)(op)))
445  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
446  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
447  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
448  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
449  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
450  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
451  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
452  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
453 #else
454  #define CYTHON_PEP393_ENABLED 0
455  #define PyUnicode_1BYTE_KIND 1
456  #define PyUnicode_2BYTE_KIND 2
457  #define PyUnicode_4BYTE_KIND 4
458  #define __Pyx_PyUnicode_READY(op) (0)
459  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
460  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
461  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
462  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
463  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
464  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
465  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
466  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
467 #endif
468 #if CYTHON_COMPILING_IN_PYPY
469  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
470  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
471 #else
472  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
473  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
474  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
475 #endif
476 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
477  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
478 #endif
479 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
480  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
481 #endif
482 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
483  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
484 #endif
485 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
486 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
487 #if PY_MAJOR_VERSION >= 3
488  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
489 #else
490  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
491 #endif
492 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
493  #define PyObject_ASCII(o) PyObject_Repr(o)
494 #endif
495 #if PY_MAJOR_VERSION >= 3
496  #define PyBaseString_Type PyUnicode_Type
497  #define PyStringObject PyUnicodeObject
498  #define PyString_Type PyUnicode_Type
499  #define PyString_Check PyUnicode_Check
500  #define PyString_CheckExact PyUnicode_CheckExact
501 #ifndef PyObject_Unicode
502  #define PyObject_Unicode PyObject_Str
503 #endif
504 #endif
505 #if PY_MAJOR_VERSION >= 3
506  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
507  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
508 #else
509  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
510  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
511 #endif
512 #ifndef PySet_CheckExact
513  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
514 #endif
515 #if CYTHON_ASSUME_SAFE_MACROS
516  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
517 #else
518  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
519 #endif
520 #if PY_MAJOR_VERSION >= 3
521  #define PyIntObject PyLongObject
522  #define PyInt_Type PyLong_Type
523  #define PyInt_Check(op) PyLong_Check(op)
524  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
525  #define PyInt_FromString PyLong_FromString
526  #define PyInt_FromUnicode PyLong_FromUnicode
527  #define PyInt_FromLong PyLong_FromLong
528  #define PyInt_FromSize_t PyLong_FromSize_t
529  #define PyInt_FromSsize_t PyLong_FromSsize_t
530  #define PyInt_AsLong PyLong_AsLong
531  #define PyInt_AS_LONG PyLong_AS_LONG
532  #define PyInt_AsSsize_t PyLong_AsSsize_t
533  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
534  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
535  #define PyNumber_Int PyNumber_Long
536 #endif
537 #if PY_MAJOR_VERSION >= 3
538  #define PyBoolObject PyLongObject
539 #endif
540 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
541  #ifndef PyUnicode_InternFromString
542  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
543  #endif
544 #endif
545 #if PY_VERSION_HEX < 0x030200A4
546  typedef long Py_hash_t;
547  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
548  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
549 #else
550  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
551  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
552 #endif
553 #if PY_MAJOR_VERSION >= 3
554  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
555 #else
556  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
557 #endif
558 #if CYTHON_USE_ASYNC_SLOTS
559  #if PY_VERSION_HEX >= 0x030500B1
560  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
561  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
562  #else
563  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
564  #endif
565 #else
566  #define __Pyx_PyType_AsAsync(obj) NULL
567 #endif
568 #ifndef __Pyx_PyAsyncMethodsStruct
569  typedef struct {
570  unaryfunc am_await;
571  unaryfunc am_aiter;
572  unaryfunc am_anext;
573  } __Pyx_PyAsyncMethodsStruct;
574 #endif
575 
576 #if defined(WIN32) || defined(MS_WINDOWS)
577  #define _USE_MATH_DEFINES
578 #endif
579 #include <math.h>
580 #ifdef NAN
581 #define __PYX_NAN() ((float) NAN)
582 #else
583 static CYTHON_INLINE float __PYX_NAN() {
584  float value;
585  memset(&value, 0xFF, sizeof(value));
586  return value;
587 }
588 #endif
589 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
590 #define __Pyx_truncl trunc
591 #else
592 #define __Pyx_truncl truncl
593 #endif
594 
595 
596 #define __PYX_ERR(f_index, lineno, Ln_error) \
597 { \
598  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
599 }
600 
601 #ifndef __PYX_EXTERN_C
602  #ifdef __cplusplus
603  #define __PYX_EXTERN_C extern "C"
604  #else
605  #define __PYX_EXTERN_C extern
606  #endif
607 #endif
608 
609 #define __PYX_HAVE__cmeshTools
610 #define __PYX_HAVE_API__cmeshTools
611 /* Early includes */
612 #include <string.h>
613 #include <stdio.h>
614 #include "numpy/arrayobject.h"
615 #include "numpy/ufuncobject.h"
616 #include "mesh.h"
617 #include "pythread.h"
618 #include <stdlib.h>
619 #include "pystate.h"
620 #ifdef _OPENMP
621 #include <omp.h>
622 #endif /* _OPENMP */
623 
624 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
625 #define CYTHON_WITHOUT_ASSERTIONS
626 #endif
627 
628 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
629  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
630 
631 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
632 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
633 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
634 #define __PYX_DEFAULT_STRING_ENCODING ""
635 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
636 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
637 #define __Pyx_uchar_cast(c) ((unsigned char)c)
638 #define __Pyx_long_cast(x) ((long)x)
639 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
640  (sizeof(type) < sizeof(Py_ssize_t)) ||\
641  (sizeof(type) > sizeof(Py_ssize_t) &&\
642  likely(v < (type)PY_SSIZE_T_MAX ||\
643  v == (type)PY_SSIZE_T_MAX) &&\
644  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
645  v == (type)PY_SSIZE_T_MIN))) ||\
646  (sizeof(type) == sizeof(Py_ssize_t) &&\
647  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
648  v == (type)PY_SSIZE_T_MAX))) )
649 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
650  return (size_t) i < (size_t) limit;
651 }
652 #if defined (__cplusplus) && __cplusplus >= 201103L
653  #include <cstdlib>
654  #define __Pyx_sst_abs(value) std::abs(value)
655 #elif SIZEOF_INT >= SIZEOF_SIZE_T
656  #define __Pyx_sst_abs(value) abs(value)
657 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
658  #define __Pyx_sst_abs(value) labs(value)
659 #elif defined (_MSC_VER)
660  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
661 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
662  #define __Pyx_sst_abs(value) llabs(value)
663 #elif defined (__GNUC__)
664  #define __Pyx_sst_abs(value) __builtin_llabs(value)
665 #else
666  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
667 #endif
668 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
669 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
670 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
671 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
672 #define __Pyx_PyBytes_FromString PyBytes_FromString
673 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
674 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
675 #if PY_MAJOR_VERSION < 3
676  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
677  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
678 #else
679  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
680  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
681 #endif
682 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
683 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
684 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
685 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
686 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
687 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
688 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
689 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
690 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
691 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
692 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
693 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
694 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
695 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
696 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
697 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
698 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
699  const Py_UNICODE *u_end = u;
700  while (*u_end++) ;
701  return (size_t)(u_end - u - 1);
702 }
703 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
704 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
705 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
706 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
707 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
708 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
709 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
710 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
711 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
712 #define __Pyx_PySequence_Tuple(obj)\
713  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
714 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
715 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
716 #if CYTHON_ASSUME_SAFE_MACROS
717 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
718 #else
719 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
720 #endif
721 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
722 #if PY_MAJOR_VERSION >= 3
723 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
724 #else
725 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
726 #endif
727 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
728 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
729 static int __Pyx_sys_getdefaultencoding_not_ascii;
730 static int __Pyx_init_sys_getdefaultencoding_params(void) {
731  PyObject* sys;
732  PyObject* default_encoding = NULL;
733  PyObject* ascii_chars_u = NULL;
734  PyObject* ascii_chars_b = NULL;
735  const char* default_encoding_c;
736  sys = PyImport_ImportModule("sys");
737  if (!sys) goto bad;
738  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
739  Py_DECREF(sys);
740  if (!default_encoding) goto bad;
741  default_encoding_c = PyBytes_AsString(default_encoding);
742  if (!default_encoding_c) goto bad;
743  if (strcmp(default_encoding_c, "ascii") == 0) {
744  __Pyx_sys_getdefaultencoding_not_ascii = 0;
745  } else {
746  char ascii_chars[128];
747  int c;
748  for (c = 0; c < 128; c++) {
749  ascii_chars[c] = c;
750  }
751  __Pyx_sys_getdefaultencoding_not_ascii = 1;
752  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
753  if (!ascii_chars_u) goto bad;
754  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
755  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
756  PyErr_Format(
757  PyExc_ValueError,
758  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
759  default_encoding_c);
760  goto bad;
761  }
762  Py_DECREF(ascii_chars_u);
763  Py_DECREF(ascii_chars_b);
764  }
765  Py_DECREF(default_encoding);
766  return 0;
767 bad:
768  Py_XDECREF(default_encoding);
769  Py_XDECREF(ascii_chars_u);
770  Py_XDECREF(ascii_chars_b);
771  return -1;
772 }
773 #endif
774 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
775 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
776 #else
777 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
778 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
779 static char* __PYX_DEFAULT_STRING_ENCODING;
780 static int __Pyx_init_sys_getdefaultencoding_params(void) {
781  PyObject* sys;
782  PyObject* default_encoding = NULL;
783  char* default_encoding_c;
784  sys = PyImport_ImportModule("sys");
785  if (!sys) goto bad;
786  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
787  Py_DECREF(sys);
788  if (!default_encoding) goto bad;
789  default_encoding_c = PyBytes_AsString(default_encoding);
790  if (!default_encoding_c) goto bad;
791  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
792  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
793  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
794  Py_DECREF(default_encoding);
795  return 0;
796 bad:
797  Py_XDECREF(default_encoding);
798  return -1;
799 }
800 #endif
801 #endif
802 
803 
804 /* Test for GCC > 2.95 */
805 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
806  #define likely(x) __builtin_expect(!!(x), 1)
807  #define unlikely(x) __builtin_expect(!!(x), 0)
808 #else /* !__GNUC__ or GCC < 2.95 */
809  #define likely(x) (x)
810  #define unlikely(x) (x)
811 #endif /* __GNUC__ */
812 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
813 
814 static PyObject *__pyx_m = NULL;
815 static PyObject *__pyx_d;
816 static PyObject *__pyx_b;
817 static PyObject *__pyx_cython_runtime = NULL;
818 static PyObject *__pyx_empty_tuple;
819 static PyObject *__pyx_empty_bytes;
820 static PyObject *__pyx_empty_unicode;
821 static int __pyx_lineno;
822 static int __pyx_clineno = 0;
823 static const char * __pyx_cfilenm= __FILE__;
824 static const char *__pyx_filename;
825 
826 /* Header.proto */
827 #if !defined(CYTHON_CCOMPLEX)
828  #if defined(__cplusplus)
829  #define CYTHON_CCOMPLEX 1
830  #elif defined(_Complex_I)
831  #define CYTHON_CCOMPLEX 1
832  #else
833  #define CYTHON_CCOMPLEX 0
834  #endif
835 #endif
836 #if CYTHON_CCOMPLEX
837  #ifdef __cplusplus
838  #include <complex>
839  #else
840  #include <complex.h>
841  #endif
842 #endif
843 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
844  #undef _Complex_I
845  #define _Complex_I 1.0fj
846 #endif
847 
848 
849 static const char *__pyx_f[] = {
850  "stringsource",
851  "proteus/cmeshTools.pyx",
852  "proteus/cmeshTools.pxd",
853  "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd",
854  "linux/lib/python3.7/site-packages/Cython/Includes/cpython/type.pxd",
855 };
856 /* ForceInitThreads.proto */
857 #ifndef __PYX_FORCE_INIT_THREADS
858  #define __PYX_FORCE_INIT_THREADS 0
859 #endif
860 
861 /* NoFastGil.proto */
862 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
863 #define __Pyx_PyGILState_Release PyGILState_Release
864 #define __Pyx_FastGIL_Remember()
865 #define __Pyx_FastGIL_Forget()
866 #define __Pyx_FastGilFuncInit()
867 
868 /* BufferFormatStructs.proto */
869 #define IS_UNSIGNED(type) (((type) -1) > 0)
870 struct __Pyx_StructField_;
871 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
872 typedef struct {
873  const char* name;
874  struct __Pyx_StructField_* fields;
875  size_t size;
876  size_t arraysize[8];
877  int ndim;
878  char typegroup;
879  char is_unsigned;
880  int flags;
881 } __Pyx_TypeInfo;
882 typedef struct __Pyx_StructField_ {
883  __Pyx_TypeInfo* type;
884  const char* name;
885  size_t offset;
886 } __Pyx_StructField;
887 typedef struct {
888  __Pyx_StructField* field;
889  size_t parent_offset;
890 } __Pyx_BufFmt_StackElem;
891 typedef struct {
892  __Pyx_StructField root;
893  __Pyx_BufFmt_StackElem* head;
894  size_t fmt_offset;
895  size_t new_count, enc_count;
896  size_t struct_alignment;
897  int is_complex;
898  char enc_type;
899  char new_packmode;
900  char enc_packmode;
901  char is_valid_array;
902 } __Pyx_BufFmt_Context;
903 
904 /* Atomics.proto */
905 #include <pythread.h>
906 #ifndef CYTHON_ATOMICS
907  #define CYTHON_ATOMICS 1
908 #endif
909 #define __pyx_atomic_int_type int
910 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
911  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
912  !defined(__i386__)
913  #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
914  #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
915  #ifdef __PYX_DEBUG_ATOMICS
916  #warning "Using GNU atomics"
917  #endif
918 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
919  #include <Windows.h>
920  #undef __pyx_atomic_int_type
921  #define __pyx_atomic_int_type LONG
922  #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
923  #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
924  #ifdef __PYX_DEBUG_ATOMICS
925  #pragma message ("Using MSVC atomics")
926  #endif
927 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
928  #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
929  #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
930  #ifdef __PYX_DEBUG_ATOMICS
931  #warning "Using Intel atomics"
932  #endif
933 #else
934  #undef CYTHON_ATOMICS
935  #define CYTHON_ATOMICS 0
936  #ifdef __PYX_DEBUG_ATOMICS
937  #warning "Not using atomics"
938  #endif
939 #endif
940 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
941 #if CYTHON_ATOMICS
942  #define __pyx_add_acquisition_count(memview)\
943  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
944  #define __pyx_sub_acquisition_count(memview)\
945  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
946 #else
947  #define __pyx_add_acquisition_count(memview)\
948  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
949  #define __pyx_sub_acquisition_count(memview)\
950  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
951 #endif
952 
953 /* MemviewSliceStruct.proto */
954 struct __pyx_memoryview_obj;
955 typedef struct {
956  struct __pyx_memoryview_obj *memview;
957  char *data;
958  Py_ssize_t shape[8];
959  Py_ssize_t strides[8];
960  Py_ssize_t suboffsets[8];
961 } __Pyx_memviewslice;
962 #define __Pyx_MemoryView_Len(m) (m.shape[0])
963 
964 
965 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
966  * # in Cython to enable them only on the right systems.
967  *
968  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
969  * ctypedef npy_int16 int16_t
970  * ctypedef npy_int32 int32_t
971  */
972 typedef npy_int8 __pyx_t_5numpy_int8_t;
973 
974 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
975  *
976  * ctypedef npy_int8 int8_t
977  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
978  * ctypedef npy_int32 int32_t
979  * ctypedef npy_int64 int64_t
980  */
981 typedef npy_int16 __pyx_t_5numpy_int16_t;
982 
983 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
984  * ctypedef npy_int8 int8_t
985  * ctypedef npy_int16 int16_t
986  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
987  * ctypedef npy_int64 int64_t
988  * #ctypedef npy_int96 int96_t
989  */
990 typedef npy_int32 __pyx_t_5numpy_int32_t;
991 
992 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
993  * ctypedef npy_int16 int16_t
994  * ctypedef npy_int32 int32_t
995  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
996  * #ctypedef npy_int96 int96_t
997  * #ctypedef npy_int128 int128_t
998  */
999 typedef npy_int64 __pyx_t_5numpy_int64_t;
1000 
1001 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
1002  * #ctypedef npy_int128 int128_t
1003  *
1004  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1005  * ctypedef npy_uint16 uint16_t
1006  * ctypedef npy_uint32 uint32_t
1007  */
1008 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1009 
1010 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
1011  *
1012  * ctypedef npy_uint8 uint8_t
1013  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1014  * ctypedef npy_uint32 uint32_t
1015  * ctypedef npy_uint64 uint64_t
1016  */
1017 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1018 
1019 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
1020  * ctypedef npy_uint8 uint8_t
1021  * ctypedef npy_uint16 uint16_t
1022  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1023  * ctypedef npy_uint64 uint64_t
1024  * #ctypedef npy_uint96 uint96_t
1025  */
1026 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1027 
1028 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786
1029  * ctypedef npy_uint16 uint16_t
1030  * ctypedef npy_uint32 uint32_t
1031  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1032  * #ctypedef npy_uint96 uint96_t
1033  * #ctypedef npy_uint128 uint128_t
1034  */
1035 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1036 
1037 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
1038  * #ctypedef npy_uint128 uint128_t
1039  *
1040  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1041  * ctypedef npy_float64 float64_t
1042  * #ctypedef npy_float80 float80_t
1043  */
1044 typedef npy_float32 __pyx_t_5numpy_float32_t;
1045 
1046 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
1047  *
1048  * ctypedef npy_float32 float32_t
1049  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1050  * #ctypedef npy_float80 float80_t
1051  * #ctypedef npy_float128 float128_t
1052  */
1053 typedef npy_float64 __pyx_t_5numpy_float64_t;
1054 
1055 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800
1056  * # The int types are mapped a bit surprising --
1057  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1058  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1059  * ctypedef npy_longlong long_t
1060  * ctypedef npy_longlong longlong_t
1061  */
1062 typedef npy_long __pyx_t_5numpy_int_t;
1063 
1064 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
1065  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1066  * ctypedef npy_long int_t
1067  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1068  * ctypedef npy_longlong longlong_t
1069  *
1070  */
1071 typedef npy_longlong __pyx_t_5numpy_long_t;
1072 
1073 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
1074  * ctypedef npy_long int_t
1075  * ctypedef npy_longlong long_t
1076  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1077  *
1078  * ctypedef npy_ulong uint_t
1079  */
1080 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1081 
1082 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804
1083  * ctypedef npy_longlong longlong_t
1084  *
1085  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1086  * ctypedef npy_ulonglong ulong_t
1087  * ctypedef npy_ulonglong ulonglong_t
1088  */
1089 typedef npy_ulong __pyx_t_5numpy_uint_t;
1090 
1091 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
1092  *
1093  * ctypedef npy_ulong uint_t
1094  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1095  * ctypedef npy_ulonglong ulonglong_t
1096  *
1097  */
1098 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1099 
1100 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806
1101  * ctypedef npy_ulong uint_t
1102  * ctypedef npy_ulonglong ulong_t
1103  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1104  *
1105  * ctypedef npy_intp intp_t
1106  */
1107 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1108 
1109 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808
1110  * ctypedef npy_ulonglong ulonglong_t
1111  *
1112  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1113  * ctypedef npy_uintp uintp_t
1114  *
1115  */
1116 typedef npy_intp __pyx_t_5numpy_intp_t;
1117 
1118 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
1119  *
1120  * ctypedef npy_intp intp_t
1121  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1122  *
1123  * ctypedef npy_double float_t
1124  */
1125 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1126 
1127 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811
1128  * ctypedef npy_uintp uintp_t
1129  *
1130  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1131  * ctypedef npy_double double_t
1132  * ctypedef npy_longdouble longdouble_t
1133  */
1134 typedef npy_double __pyx_t_5numpy_float_t;
1135 
1136 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
1137  *
1138  * ctypedef npy_double float_t
1139  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1140  * ctypedef npy_longdouble longdouble_t
1141  *
1142  */
1143 typedef npy_double __pyx_t_5numpy_double_t;
1144 
1145 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
1146  * ctypedef npy_double float_t
1147  * ctypedef npy_double double_t
1148  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1149  *
1150  * ctypedef npy_cfloat cfloat_t
1151  */
1152 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1153 /* Declarations.proto */
1154 #if CYTHON_CCOMPLEX
1155  #ifdef __cplusplus
1156  typedef ::std::complex< float > __pyx_t_float_complex;
1157  #else
1158  typedef float _Complex __pyx_t_float_complex;
1159  #endif
1160 #else
1161  typedef struct { float real, imag; } __pyx_t_float_complex;
1162 #endif
1163 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1164 
1165 /* Declarations.proto */
1166 #if CYTHON_CCOMPLEX
1167  #ifdef __cplusplus
1168  typedef ::std::complex< double > __pyx_t_double_complex;
1169  #else
1170  typedef double _Complex __pyx_t_double_complex;
1171  #endif
1172 #else
1173  typedef struct { double real, imag; } __pyx_t_double_complex;
1174 #endif
1175 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1176 
1177 
1178 /*--- Type declarations ---*/
1179 struct __pyx_obj_10cmeshTools_CMesh;
1180 struct __pyx_obj_10cmeshTools_CMultilevelMesh;
1181 struct __pyx_array_obj;
1182 struct __pyx_MemviewEnum_obj;
1183 struct __pyx_memoryview_obj;
1184 struct __pyx_memoryviewslice_obj;
1185 
1186 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
1187  * ctypedef npy_longdouble longdouble_t
1188  *
1189  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1190  * ctypedef npy_cdouble cdouble_t
1191  * ctypedef npy_clongdouble clongdouble_t
1192  */
1193 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1194 
1195 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
1196  *
1197  * ctypedef npy_cfloat cfloat_t
1198  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1199  * ctypedef npy_clongdouble clongdouble_t
1200  *
1201  */
1202 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1203 
1204 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817
1205  * ctypedef npy_cfloat cfloat_t
1206  * ctypedef npy_cdouble cdouble_t
1207  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1208  *
1209  * ctypedef npy_cdouble complex_t
1210  */
1211 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1212 
1213 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819
1214  * ctypedef npy_clongdouble clongdouble_t
1215  *
1216  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1217  *
1218  * cdef inline object PyArray_MultiIterNew1(a):
1219  */
1220 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1221 
1222 /* "cmeshTools.pxd":5
1223  * cimport mesh as cppm
1224  *
1225  * cdef class CMesh: # <<<<<<<<<<<<<<
1226  * cdef cppm.Mesh mesh
1227  * cdef public:
1228  */
1229 struct __pyx_obj_10cmeshTools_CMesh {
1230  PyObject_HEAD
1231  struct Mesh mesh;
1232  int nElements_global;
1233  int nNodes_global;
1234  int nNodes_element;
1240  int max_nElements_node;
1241  int nEdges_global;
1243  PyArrayObject *elementNodesArray;
1244  PyArrayObject *nodeElementsArray;
1245  PyArrayObject *nodeElementOffsets;
1246  PyArrayObject *elementNeighborsArray;
1247  PyArrayObject *elementBoundariesArray;
1248  PyArrayObject *elementBoundaryNodesArray;
1249  PyArrayObject *elementBoundaryElementsArray;
1251  PyArrayObject *interiorElementBoundariesArray;
1252  PyArrayObject *exteriorElementBoundariesArray;
1253  PyArrayObject *edgeNodesArray;
1254  PyArrayObject *nodeStarArray;
1255  PyArrayObject *nodeStarOffsets;
1256  PyArrayObject *elementMaterialTypes;
1257  PyArrayObject *elementBoundaryMaterialTypes;
1258  PyArrayObject *nodeMaterialTypes;
1259  PyArrayObject *nodeArray;
1260  int nx;
1261  int ny;
1262  int nz;
1263  int px;
1264  int py;
1265  int pz;
1266  PyArrayObject *elementIJK;
1267  PyArrayObject *weights;
1268  PyArrayObject *U_KNOT;
1269  PyArrayObject *V_KNOT;
1270  PyArrayObject *W_KNOT;
1271  PyArrayObject *elementDiametersArray;
1272  PyArrayObject *elementInnerDiametersArray;
1273  PyArrayObject *elementBoundaryDiametersArray;
1274  PyArrayObject *elementBarycentersArray;
1275  PyArrayObject *elementBoundaryBarycentersArray;
1276  PyArrayObject *nodeDiametersArray;
1277  PyArrayObject *nodeSupportArray;
1278  double h;
1279  double hMin;
1280  double sigmaMax;
1281  double volume;
1282 };
1283 
1284 
1285 /* "cmeshTools.pyx":199
1286  * return CMeshnew
1287  *
1288  * cdef class CMultilevelMesh: # <<<<<<<<<<<<<<
1289  * cdef cppm.MultilevelMesh multilevelMesh
1290  * cdef public:
1291  */
1292 struct __pyx_obj_10cmeshTools_CMultilevelMesh {
1293  PyObject_HEAD
1294  struct MultilevelMesh multilevelMesh;
1295  int nLevels;
1296  PyObject *cmeshList;
1297  PyObject *elementParentsArrayList;
1298  PyObject *elementChildrenArrayList;
1299  PyObject *elementChildrenOffsetsList;
1300 };
1301 
1302 
1303 /* "View.MemoryView":105
1304  *
1305  * @cname("__pyx_array")
1306  * cdef class array: # <<<<<<<<<<<<<<
1307  *
1308  * cdef:
1309  */
1310 struct __pyx_array_obj {
1311  PyObject_HEAD
1312  struct __pyx_vtabstruct_array *__pyx_vtab;
1313  char *data;
1314  Py_ssize_t len;
1315  char *format;
1316  int ndim;
1317  Py_ssize_t *_shape;
1318  Py_ssize_t *_strides;
1319  Py_ssize_t itemsize;
1320  PyObject *mode;
1321  PyObject *_format;
1322  void (*callback_free_data)(void *);
1323  int free_data;
1324  int dtype_is_object;
1325 };
1326 
1327 
1328 /* "View.MemoryView":279
1329  *
1330  * @cname('__pyx_MemviewEnum')
1331  * cdef class Enum(object): # <<<<<<<<<<<<<<
1332  * cdef object name
1333  * def __init__(self, name):
1334  */
1335 struct __pyx_MemviewEnum_obj {
1336  PyObject_HEAD
1337  PyObject *name;
1338 };
1339 
1340 
1341 /* "View.MemoryView":330
1342  *
1343  * @cname('__pyx_memoryview')
1344  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1345  *
1346  * cdef object obj
1347  */
1348 struct __pyx_memoryview_obj {
1349  PyObject_HEAD
1350  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1351  PyObject *obj;
1352  PyObject *_size;
1353  PyObject *_array_interface;
1354  PyThread_type_lock lock;
1355  __pyx_atomic_int acquisition_count[2];
1356  __pyx_atomic_int *acquisition_count_aligned_p;
1357  Py_buffer view;
1358  int flags;
1359  int dtype_is_object;
1360  __Pyx_TypeInfo *typeinfo;
1361 };
1362 
1363 
1364 /* "View.MemoryView":965
1365  *
1366  * @cname('__pyx_memoryviewslice')
1367  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1368  * "Internal class for passing memoryview slices to Python"
1369  *
1370  */
1371 struct __pyx_memoryviewslice_obj {
1372  struct __pyx_memoryview_obj __pyx_base;
1373  __Pyx_memviewslice from_slice;
1374  PyObject *from_object;
1375  PyObject *(*to_object_func)(char *);
1376  int (*to_dtype_func)(char *, PyObject *);
1377 };
1378 
1379 
1380 
1381 /* "View.MemoryView":105
1382  *
1383  * @cname("__pyx_array")
1384  * cdef class array: # <<<<<<<<<<<<<<
1385  *
1386  * cdef:
1387  */
1388 
1389 struct __pyx_vtabstruct_array {
1390  PyObject *(*get_memview)(struct __pyx_array_obj *);
1391 };
1392 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1393 
1394 
1395 /* "View.MemoryView":330
1396  *
1397  * @cname('__pyx_memoryview')
1398  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1399  *
1400  * cdef object obj
1401  */
1402 
1403 struct __pyx_vtabstruct_memoryview {
1404  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1405  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1406  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1407  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1408  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1409  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1410  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1411 };
1412 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1413 
1414 
1415 /* "View.MemoryView":965
1416  *
1417  * @cname('__pyx_memoryviewslice')
1418  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1419  * "Internal class for passing memoryview slices to Python"
1420  *
1421  */
1422 
1423 struct __pyx_vtabstruct__memoryviewslice {
1424  struct __pyx_vtabstruct_memoryview __pyx_base;
1425 };
1426 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1427 
1428 /* --- Runtime support code (head) --- */
1429 /* Refnanny.proto */
1430 #ifndef CYTHON_REFNANNY
1431  #define CYTHON_REFNANNY 0
1432 #endif
1433 #if CYTHON_REFNANNY
1434  typedef struct {
1435  void (*INCREF)(void*, PyObject*, int);
1436  void (*DECREF)(void*, PyObject*, int);
1437  void (*GOTREF)(void*, PyObject*, int);
1438  void (*GIVEREF)(void*, PyObject*, int);
1439  void* (*SetupContext)(const char*, int, const char*);
1440  void (*FinishContext)(void**);
1441  } __Pyx_RefNannyAPIStruct;
1442  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1443  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1444  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1445 #ifdef WITH_THREAD
1446  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1447  if (acquire_gil) {\
1448  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1449  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1450  PyGILState_Release(__pyx_gilstate_save);\
1451  } else {\
1452  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1453  }
1454 #else
1455  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1456  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1457 #endif
1458  #define __Pyx_RefNannyFinishContext()\
1459  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1460  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1461  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1462  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1463  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1464  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1465  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1466  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1467  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1468 #else
1469  #define __Pyx_RefNannyDeclarations
1470  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1471  #define __Pyx_RefNannyFinishContext()
1472  #define __Pyx_INCREF(r) Py_INCREF(r)
1473  #define __Pyx_DECREF(r) Py_DECREF(r)
1474  #define __Pyx_GOTREF(r)
1475  #define __Pyx_GIVEREF(r)
1476  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1477  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1478  #define __Pyx_XGOTREF(r)
1479  #define __Pyx_XGIVEREF(r)
1480 #endif
1481 #define __Pyx_XDECREF_SET(r, v) do {\
1482  PyObject *tmp = (PyObject *) r;\
1483  r = v; __Pyx_XDECREF(tmp);\
1484  } while (0)
1485 #define __Pyx_DECREF_SET(r, v) do {\
1486  PyObject *tmp = (PyObject *) r;\
1487  r = v; __Pyx_DECREF(tmp);\
1488  } while (0)
1489 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1490 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1491 
1492 /* PyObjectGetAttrStr.proto */
1493 #if CYTHON_USE_TYPE_SLOTS
1494 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1495 #else
1496 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1497 #endif
1498 
1499 /* GetBuiltinName.proto */
1500 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1501 
1502 /* RaiseArgTupleInvalid.proto */
1503 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1504  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1505 
1506 /* KeywordStringCheck.proto */
1507 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1508 
1509 /* PyDictVersioning.proto */
1510 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1511 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1512 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1513 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1514  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1515  (cache_var) = (value);
1516 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1517  static PY_UINT64_T __pyx_dict_version = 0;\
1518  static PyObject *__pyx_dict_cached_value = NULL;\
1519  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1520  (VAR) = __pyx_dict_cached_value;\
1521  } else {\
1522  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1523  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1524  }\
1525 }
1526 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1527 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1528 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1529 #else
1530 #define __PYX_GET_DICT_VERSION(dict) (0)
1531 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1532 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1533 #endif
1534 
1535 /* GetModuleGlobalName.proto */
1536 #if CYTHON_USE_DICT_VERSIONS
1537 #define __Pyx_GetModuleGlobalName(var, name) {\
1538  static PY_UINT64_T __pyx_dict_version = 0;\
1539  static PyObject *__pyx_dict_cached_value = NULL;\
1540  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1541  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1542  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1543 }
1544 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1545  PY_UINT64_T __pyx_dict_version;\
1546  PyObject *__pyx_dict_cached_value;\
1547  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1548 }
1549 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1550 #else
1551 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1552 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1553 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1554 #endif
1555 
1556 /* PyCFunctionFastCall.proto */
1557 #if CYTHON_FAST_PYCCALL
1558 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1559 #else
1560 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1561 #endif
1562 
1563 /* PyFunctionFastCall.proto */
1564 #if CYTHON_FAST_PYCALL
1565 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1566  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1567 #if 1 || PY_VERSION_HEX < 0x030600B1
1568 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1569 #else
1570 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1571 #endif
1572 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1573  (sizeof(char [1 - 2*!(cond)]) - 1)
1574 #ifndef Py_MEMBER_SIZE
1575 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1576 #endif
1577  static size_t __pyx_pyframe_localsplus_offset = 0;
1578  #include "frameobject.h"
1579  #define __Pxy_PyFrame_Initialize_Offsets()\
1580  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1581  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1582  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1583  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1584 #endif
1585 
1586 /* PyObjectCall.proto */
1587 #if CYTHON_COMPILING_IN_CPYTHON
1588 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1589 #else
1590 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1591 #endif
1592 
1593 /* PyObjectCall2Args.proto */
1594 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1595 
1596 /* PyObjectCallMethO.proto */
1597 #if CYTHON_COMPILING_IN_CPYTHON
1598 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1599 #endif
1600 
1601 /* PyObjectCallOneArg.proto */
1602 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1603 
1604 /* ExtTypeTest.proto */
1605 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1606 
1607 /* PyThreadStateGet.proto */
1608 #if CYTHON_FAST_THREAD_STATE
1609 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1610 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1611 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1612 #else
1613 #define __Pyx_PyThreadState_declare
1614 #define __Pyx_PyThreadState_assign
1615 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1616 #endif
1617 
1618 /* PyErrFetchRestore.proto */
1619 #if CYTHON_FAST_THREAD_STATE
1620 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1621 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1622 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1623 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1624 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1625 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1626 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1627 #if CYTHON_COMPILING_IN_CPYTHON
1628 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1629 #else
1630 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1631 #endif
1632 #else
1633 #define __Pyx_PyErr_Clear() PyErr_Clear()
1634 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1635 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1636 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1637 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1638 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1639 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1640 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1641 #endif
1642 
1643 /* RaiseException.proto */
1644 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1645 
1646 /* PyObjectCallNoArg.proto */
1647 #if CYTHON_COMPILING_IN_CPYTHON
1648 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1649 #else
1650 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1651 #endif
1652 
1653 /* RaiseDoubleKeywords.proto */
1654 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1655 
1656 /* ParseKeywords.proto */
1657 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1658  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1659  const char* function_name);
1660 
1661 /* ArgTypeTest.proto */
1662 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1663  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1664  __Pyx__ArgTypeTest(obj, type, name, exact))
1665 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1666 
1667 /* PyIntBinop.proto */
1668 #if !CYTHON_COMPILING_IN_PYPY
1669 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1670 #else
1671 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
1672  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
1673 #endif
1674 
1675 /* PyIntCompare.proto */
1676 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1677 
1678 /* WriteUnraisableException.proto */
1679 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1680  int lineno, const char *filename,
1681  int full_traceback, int nogil);
1682 
1683 /* DictGetItem.proto */
1684 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1685 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
1686 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
1687  (likely(PyDict_CheckExact(obj)) ?\
1688  __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
1689 #else
1690 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1691 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
1692 #endif
1693 
1694 /* RaiseTooManyValuesToUnpack.proto */
1695 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1696 
1697 /* RaiseNeedMoreValuesToUnpack.proto */
1698 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1699 
1700 /* RaiseNoneIterError.proto */
1701 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1702 
1703 /* GetTopmostException.proto */
1704 #if CYTHON_USE_EXC_INFO_STACK
1705 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1706 #endif
1707 
1708 /* SaveResetException.proto */
1709 #if CYTHON_FAST_THREAD_STATE
1710 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1711 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1712 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1713 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1714 #else
1715 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1716 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1717 #endif
1718 
1719 /* PyErrExceptionMatches.proto */
1720 #if CYTHON_FAST_THREAD_STATE
1721 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1722 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1723 #else
1724 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1725 #endif
1726 
1727 /* GetException.proto */
1728 #if CYTHON_FAST_THREAD_STATE
1729 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1730 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1731 #else
1732 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1733 #endif
1734 
1735 /* IncludeStringH.proto */
1736 #include <string.h>
1737 
1738 /* BytesEquals.proto */
1739 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1740 
1741 /* UnicodeEquals.proto */
1742 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1743 
1744 /* StrEquals.proto */
1745 #if PY_MAJOR_VERSION >= 3
1746 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1747 #else
1748 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1749 #endif
1750 
1751 /* None.proto */
1752 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1753 
1754 /* UnaryNegOverflows.proto */
1755 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1756  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1757 
1758 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1759 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
1760 /* GetAttr.proto */
1761 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1762 
1763 /* GetItemInt.proto */
1764 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1765  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1766  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1767  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1768  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1769 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1770  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1771  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1772  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1773 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1774  int wraparound, int boundscheck);
1775 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1776  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1777  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1778  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1779 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1780  int wraparound, int boundscheck);
1781 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1782 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1783  int is_list, int wraparound, int boundscheck);
1784 
1785 /* ObjectGetItem.proto */
1786 #if CYTHON_USE_TYPE_SLOTS
1787 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1788 #else
1789 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1790 #endif
1791 
1792 /* decode_c_string_utf16.proto */
1793 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1794  int byteorder = 0;
1795  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1796 }
1797 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1798  int byteorder = -1;
1799  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1800 }
1801 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1802  int byteorder = 1;
1803  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1804 }
1805 
1806 /* decode_c_string.proto */
1807 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
1808  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
1809  const char* encoding, const char* errors,
1810  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1811 
1812 /* GetAttr3.proto */
1813 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1814 
1815 /* SwapException.proto */
1816 #if CYTHON_FAST_THREAD_STATE
1817 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1818 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1819 #else
1820 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1821 #endif
1822 
1823 /* Import.proto */
1824 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1825 
1826 /* FastTypeChecks.proto */
1827 #if CYTHON_COMPILING_IN_CPYTHON
1828 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1829 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1830 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1831 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1832 #else
1833 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1834 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1835 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1836 #endif
1837 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1838 
1839 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1840 /* ListCompAppend.proto */
1841 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1842 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1843  PyListObject* L = (PyListObject*) list;
1844  Py_ssize_t len = Py_SIZE(list);
1845  if (likely(L->allocated > len)) {
1846  Py_INCREF(x);
1847  PyList_SET_ITEM(list, len, x);
1848  Py_SIZE(list) = len+1;
1849  return 0;
1850  }
1851  return PyList_Append(list, x);
1852 }
1853 #else
1854 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1855 #endif
1856 
1857 /* PyIntBinop.proto */
1858 #if !CYTHON_COMPILING_IN_PYPY
1859 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1860 #else
1861 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1862  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1863 #endif
1864 
1865 /* ListExtend.proto */
1866 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
1867 #if CYTHON_COMPILING_IN_CPYTHON
1868  PyObject* none = _PyList_Extend((PyListObject*)L, v);
1869  if (unlikely(!none))
1870  return -1;
1871  Py_DECREF(none);
1872  return 0;
1873 #else
1874  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
1875 #endif
1876 }
1877 
1878 /* ListAppend.proto */
1879 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1880 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1881  PyListObject* L = (PyListObject*) list;
1882  Py_ssize_t len = Py_SIZE(list);
1883  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1884  Py_INCREF(x);
1885  PyList_SET_ITEM(list, len, x);
1886  Py_SIZE(list) = len+1;
1887  return 0;
1888  }
1889  return PyList_Append(list, x);
1890 }
1891 #else
1892 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1893 #endif
1894 
1895 /* None.proto */
1896 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1897 
1898 /* None.proto */
1899 static CYTHON_INLINE long __Pyx_div_long(long, long);
1900 
1901 /* ImportFrom.proto */
1902 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1903 
1904 /* HasAttr.proto */
1905 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1906 
1907 /* StringJoin.proto */
1908 #if PY_MAJOR_VERSION < 3
1909 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
1910 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
1911 #else
1912 #define __Pyx_PyString_Join PyUnicode_Join
1913 #define __Pyx_PyBaseString_Join PyUnicode_Join
1914 #endif
1915 #if CYTHON_COMPILING_IN_CPYTHON
1916  #if PY_MAJOR_VERSION < 3
1917  #define __Pyx_PyBytes_Join _PyString_Join
1918  #else
1919  #define __Pyx_PyBytes_Join _PyBytes_Join
1920  #endif
1921 #else
1922 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
1923 #endif
1924 
1925 /* PyObject_Unicode.proto */
1926 #if PY_MAJOR_VERSION >= 3
1927 #define __Pyx_PyObject_Unicode(obj)\
1928  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1929 #else
1930 #define __Pyx_PyObject_Unicode(obj)\
1931  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1932 #endif
1933 
1934 /* PyObject_GenericGetAttrNoDict.proto */
1935 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1936 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1937 #else
1938 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1939 #endif
1940 
1941 /* PyObject_GenericGetAttr.proto */
1942 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1943 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1944 #else
1945 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1946 #endif
1947 
1948 /* SetupReduce.proto */
1949 static int __Pyx_setup_reduce(PyObject* type_obj);
1950 
1951 /* SetVTable.proto */
1952 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1953 
1954 /* TypeImport.proto */
1955 #ifndef __PYX_HAVE_RT_ImportType_proto
1956 #define __PYX_HAVE_RT_ImportType_proto
1957 enum __Pyx_ImportType_CheckSize {
1958  __Pyx_ImportType_CheckSize_Error = 0,
1959  __Pyx_ImportType_CheckSize_Warn = 1,
1960  __Pyx_ImportType_CheckSize_Ignore = 2
1961 };
1962 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1963 #endif
1964 
1965 /* CLineInTraceback.proto */
1966 #ifdef CYTHON_CLINE_IN_TRACEBACK
1967 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1968 #else
1969 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1970 #endif
1971 
1972 /* CodeObjectCache.proto */
1973 typedef struct {
1974  PyCodeObject* code_object;
1975  int code_line;
1976 } __Pyx_CodeObjectCacheEntry;
1977 struct __Pyx_CodeObjectCache {
1978  int count;
1979  int max_count;
1980  __Pyx_CodeObjectCacheEntry* entries;
1981 };
1982 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1983 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1984 static PyCodeObject *__pyx_find_code_object(int code_line);
1985 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1986 
1987 /* AddTraceback.proto */
1988 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1989  int py_line, const char *filename);
1990 
1991 /* CIntToPy.proto */
1992 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1993 
1994 /* MemviewDtypeToObject.proto */
1995 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
1996 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
1997 
1998 /* MemviewDtypeToObject.proto */
1999 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
2000 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
2001 
2002 /* Print.proto */
2003 static int __Pyx_Print(PyObject*, PyObject *, int);
2004 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
2005 static PyObject* __pyx_print = 0;
2006 static PyObject* __pyx_print_kwargs = 0;
2007 #endif
2008 
2009 /* RealImag.proto */
2010 #if CYTHON_CCOMPLEX
2011  #ifdef __cplusplus
2012  #define __Pyx_CREAL(z) ((z).real())
2013  #define __Pyx_CIMAG(z) ((z).imag())
2014  #else
2015  #define __Pyx_CREAL(z) (__real__(z))
2016  #define __Pyx_CIMAG(z) (__imag__(z))
2017  #endif
2018 #else
2019  #define __Pyx_CREAL(z) ((z).real)
2020  #define __Pyx_CIMAG(z) ((z).imag)
2021 #endif
2022 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2023  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2024  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2025  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2026 #else
2027  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2028  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2029 #endif
2030 
2031 /* Arithmetic.proto */
2032 #if CYTHON_CCOMPLEX
2033  #define __Pyx_c_eq_float(a, b) ((a)==(b))
2034  #define __Pyx_c_sum_float(a, b) ((a)+(b))
2035  #define __Pyx_c_diff_float(a, b) ((a)-(b))
2036  #define __Pyx_c_prod_float(a, b) ((a)*(b))
2037  #define __Pyx_c_quot_float(a, b) ((a)/(b))
2038  #define __Pyx_c_neg_float(a) (-(a))
2039  #ifdef __cplusplus
2040  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2041  #define __Pyx_c_conj_float(z) (::std::conj(z))
2042  #if 1
2043  #define __Pyx_c_abs_float(z) (::std::abs(z))
2044  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2045  #endif
2046  #else
2047  #define __Pyx_c_is_zero_float(z) ((z)==0)
2048  #define __Pyx_c_conj_float(z) (conjf(z))
2049  #if 1
2050  #define __Pyx_c_abs_float(z) (cabsf(z))
2051  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2052  #endif
2053  #endif
2054 #else
2055  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2056  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2057  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2058  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2059  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2060  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2061  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2062  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2063  #if 1
2064  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2065  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2066  #endif
2067 #endif
2068 
2069 /* Arithmetic.proto */
2070 #if CYTHON_CCOMPLEX
2071  #define __Pyx_c_eq_double(a, b) ((a)==(b))
2072  #define __Pyx_c_sum_double(a, b) ((a)+(b))
2073  #define __Pyx_c_diff_double(a, b) ((a)-(b))
2074  #define __Pyx_c_prod_double(a, b) ((a)*(b))
2075  #define __Pyx_c_quot_double(a, b) ((a)/(b))
2076  #define __Pyx_c_neg_double(a) (-(a))
2077  #ifdef __cplusplus
2078  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2079  #define __Pyx_c_conj_double(z) (::std::conj(z))
2080  #if 1
2081  #define __Pyx_c_abs_double(z) (::std::abs(z))
2082  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2083  #endif
2084  #else
2085  #define __Pyx_c_is_zero_double(z) ((z)==0)
2086  #define __Pyx_c_conj_double(z) (conj(z))
2087  #if 1
2088  #define __Pyx_c_abs_double(z) (cabs(z))
2089  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2090  #endif
2091  #endif
2092 #else
2093  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2094  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2095  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2096  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2097  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2098  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2099  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2100  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2101  #if 1
2102  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2103  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2104  #endif
2105 #endif
2106 
2107 /* CIntToPy.proto */
2108 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
2109 
2110 #if PY_MAJOR_VERSION < 3
2111  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2112  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2113 #else
2114  #define __Pyx_GetBuffer PyObject_GetBuffer
2115  #define __Pyx_ReleaseBuffer PyBuffer_Release
2116 #endif
2117 
2118 
2119 /* BufferStructDeclare.proto */
2120 typedef struct {
2121  Py_ssize_t shape, strides, suboffsets;
2122 } __Pyx_Buf_DimInfo;
2123 typedef struct {
2124  size_t refcount;
2125  Py_buffer pybuffer;
2126 } __Pyx_Buffer;
2127 typedef struct {
2128  __Pyx_Buffer *rcbuffer;
2129  char *data;
2130  __Pyx_Buf_DimInfo diminfo[8];
2131 } __Pyx_LocalBuf_ND;
2132 
2133 /* MemviewSliceIsContig.proto */
2134 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2135 
2136 /* OverlappingSlices.proto */
2137 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2138  __Pyx_memviewslice *slice2,
2139  int ndim, size_t itemsize);
2140 
2141 /* Capsule.proto */
2142 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2143 
2144 /* CIntFromPy.proto */
2145 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2146 
2147 /* TypeInfoToFormat.proto */
2148 struct __pyx_typeinfo_string {
2149  char string[3];
2150 };
2151 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2152 
2153 /* PrintOne.proto */
2154 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
2155 
2156 /* MemviewSliceCopyTemplate.proto */
2157 static __Pyx_memviewslice
2158 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2159  const char *mode, int ndim,
2160  size_t sizeof_dtype, int contig_flag,
2161  int dtype_is_object);
2162 
2163 /* MemviewSliceInit.proto */
2164 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2165 #define __Pyx_MEMVIEW_DIRECT 1
2166 #define __Pyx_MEMVIEW_PTR 2
2167 #define __Pyx_MEMVIEW_FULL 4
2168 #define __Pyx_MEMVIEW_CONTIG 8
2169 #define __Pyx_MEMVIEW_STRIDED 16
2170 #define __Pyx_MEMVIEW_FOLLOW 32
2171 #define __Pyx_IS_C_CONTIG 1
2172 #define __Pyx_IS_F_CONTIG 2
2173 static int __Pyx_init_memviewslice(
2174  struct __pyx_memoryview_obj *memview,
2175  int ndim,
2176  __Pyx_memviewslice *memviewslice,
2177  int memview_is_new_reference);
2178 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2179  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2180 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2181  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2182 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2183 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2184 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2185 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2186 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2187 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2188 
2189 /* CIntFromPy.proto */
2190 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2191 
2192 /* CIntToPy.proto */
2193 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2194 
2195 /* CIntFromPy.proto */
2196 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2197 
2198 /* CheckBinaryVersion.proto */
2199 static int __Pyx_check_binary_version(void);
2200 
2201 /* InitStrings.proto */
2202 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2203 
2204 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2205 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2206 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2207 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2208 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
2209 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2210 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2211 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2212 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2213 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2214 
2215 /* Module declarations from 'cpython.buffer' */
2216 
2217 /* Module declarations from 'libc.string' */
2218 
2219 /* Module declarations from 'libc.stdio' */
2220 
2221 /* Module declarations from '__builtin__' */
2222 
2223 /* Module declarations from 'cpython.type' */
2224 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2225 
2226 /* Module declarations from 'cpython' */
2227 
2228 /* Module declarations from 'cpython.object' */
2229 
2230 /* Module declarations from 'cpython.ref' */
2231 
2232 /* Module declarations from 'cpython.mem' */
2233 
2234 /* Module declarations from 'numpy' */
2235 
2236 /* Module declarations from 'numpy' */
2237 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2238 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2239 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2240 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2241 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2242 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
2243 
2244 /* Module declarations from 'libcpp' */
2245 
2246 /* Module declarations from 'mesh' */
2247 
2248 /* Module declarations from 'cython.view' */
2249 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2250 
2251 /* Module declarations from 'cython' */
2252 
2253 /* Module declarations from 'cmeshTools' */
2254 static PyTypeObject *__pyx_ptype_10cmeshTools_CMesh = 0;
2255 static PyTypeObject *__pyx_ptype_10cmeshTools_CMultilevelMesh = 0;
2256 static PyTypeObject *__pyx_array_type = 0;
2257 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2258 static PyTypeObject *__pyx_memoryview_type = 0;
2259 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2260 static PyObject *generic = 0;
2261 static PyObject *strided = 0;
2262 static PyObject *indirect = 0;
2263 static PyObject *contiguous = 0;
2264 static PyObject *indirect_contiguous = 0;
2265 static int __pyx_memoryview_thread_locks_used;
2266 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2267 static struct __pyx_obj_10cmeshTools_CMesh *__pyx_f_10cmeshTools_CMesh_FromMesh(struct Mesh); /*proto*/
2268 static void __pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(int, int, int, double, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2269 static void __pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2270 static void __pyx_f_10cmeshTools_generateFromTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2271 static void __pyx_f_10cmeshTools_writeTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2272 static void __pyx_f_10cmeshTools_generateFromTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2273 static void __pyx_f_10cmeshTools_generateFromTetgenFilesParallel(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2274 static void __pyx_f_10cmeshTools_writeTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2275 static void __pyx_f_10cmeshTools_write3dmFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2276 static void __pyx_f_10cmeshTools_write2dmFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2277 static void __pyx_f_10cmeshTools_generateFromHexFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2278 static void __pyx_f_10cmeshTools_generateFrom3DMFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2279 static void __pyx_f_10cmeshTools_generateFrom2DMFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2280 static void __pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2281 static void __pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2282 static void __pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(struct __pyx_obj_10cmeshTools_CMesh *, int, int, int, int __pyx_skip_dispatch); /*proto*/
2283 static void __pyx_f_10cmeshTools_constructElementBoundaryElementsArray(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2284 static void __pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(int, int, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int, int __pyx_skip_dispatch); /*proto*/
2285 static void __pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(int, int, int, int, int, int, double, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2286 static void __pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(int, int, int, int, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2287 static void __pyx_f_10cmeshTools_computeGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2288 static void __pyx_f_10cmeshTools_allocateGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2289 static void __pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(int, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2290 static void __pyx_f_10cmeshTools_computeGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2291 static void __pyx_f_10cmeshTools_allocateGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2292 static void __pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2293 static void __pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2294 static void __pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2295 static void __pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2296 static void __pyx_f_10cmeshTools_computeGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2297 static void __pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2298 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2299 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2300 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2301 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2302 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2303 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2304 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
2305 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
2306 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2307 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2308 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2309 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2310 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2311 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2312 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2313 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2314 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2315 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2316 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2317 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2318 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2319 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2320 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2321 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2322 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2323 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2324 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2325 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2326 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2327 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2328 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2329 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2330 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2331 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
2332 static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
2333 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
2334 #define __Pyx_MODULE_NAME "cmeshTools"
2335 extern int __pyx_module_is_main_cmeshTools;
2336 int __pyx_module_is_main_cmeshTools = 0;
2337 
2338 /* Implementation of 'cmeshTools' */
2339 static PyObject *__pyx_builtin_TypeError;
2340 static PyObject *__pyx_builtin_range;
2341 static PyObject *__pyx_builtin_ValueError;
2342 static PyObject *__pyx_builtin_RuntimeError;
2343 static PyObject *__pyx_builtin_ImportError;
2344 static PyObject *__pyx_builtin_MemoryError;
2345 static PyObject *__pyx_builtin_enumerate;
2346 static PyObject *__pyx_builtin_Ellipsis;
2347 static PyObject *__pyx_builtin_id;
2348 static PyObject *__pyx_builtin_IndexError;
2349 static const char __pyx_k_O[] = "O";
2350 static const char __pyx_k_T[] = "T{";
2351  static const char __pyx_k_c[] = "c";
2352  static const char __pyx_k_h[] = "h";
2353  static const char __pyx_k_s[] = "(%s)";
2354  static const char __pyx_k_Lx[] = "Lx";
2355  static const char __pyx_k_Ly[] = "Ly";
2356  static const char __pyx_k_Lz[] = "Lz";
2357  static const char __pyx_k_id[] = "id";
2358  static const char __pyx_k_np[] = "np";
2359  static const char __pyx_k_nx[] = "nx";
2360  static const char __pyx_k_ny[] = "ny";
2361  static const char __pyx_k_nz[] = "nz";
2362  static const char __pyx_k_px[] = "px";
2363  static const char __pyx_k_py[] = "py";
2364  static const char __pyx_k_pz[] = "pz";
2365  static const char __pyx_k_MPI[] = "MPI";
2366  static const char __pyx_k__31[] = "^";
2367  static const char __pyx_k__32[] = "";
2368  static const char __pyx_k__33[] = ":";
2369 static const char __pyx_k__34[] = "}";
2370 static const char __pyx_k__35[] = ",";
2371 static const char __pyx_k_end[] = "end";
2372 static const char __pyx_k_new[] = "__new__";
2373 static const char __pyx_k_obj[] = "obj";
2374 static const char __pyx_k_Comm[] = "Comm";
2375 static const char __pyx_k_base[] = "base";
2376 static const char __pyx_k_dict[] = "__dict__";
2377 static const char __pyx_k_file[] = "file";
2378 static const char __pyx_k_hMin[] = "hMin";
2379 static const char __pyx_k_join[] = "join";
2380 static const char __pyx_k_main[] = "__main__";
2381 static const char __pyx_k_mode[] = "mode";
2382 static const char __pyx_k_name[] = "name";
2383 static const char __pyx_k_ndim[] = "ndim";
2384 static const char __pyx_k_pack[] = "pack";
2385 static const char __pyx_k_size[] = "size";
2386 static const char __pyx_k_step[] = "step";
2387 static const char __pyx_k_stop[] = "stop";
2388 static const char __pyx_k_test[] = "__test__";
2389 static const char __pyx_k_ASCII[] = "ASCII";
2390 static const char __pyx_k_CMesh[] = "CMesh";
2391 static const char __pyx_k_class[] = "__class__";
2392 static const char __pyx_k_cmesh[] = "cmesh";
2393 static const char __pyx_k_dtype[] = "dtype";
2394 static const char __pyx_k_empty[] = "empty";
2395 static const char __pyx_k_error[] = "error";
2396 static const char __pyx_k_flags[] = "flags";
2397 static const char __pyx_k_int32[] = "int32";
2398 static const char __pyx_k_numpy[] = "numpy";
2399 static const char __pyx_k_print[] = "print";
2400 static const char __pyx_k_range[] = "range";
2401 static const char __pyx_k_shape[] = "shape";
2402 static const char __pyx_k_start[] = "start";
2403 static const char __pyx_k_zeros[] = "zeros";
2404 static const char __pyx_k_U_KNOT[] = "U_KNOT";
2405 static const char __pyx_k_V_KNOT[] = "V_KNOT";
2406 static const char __pyx_k_W_KNOT[] = "W_KNOT";
2407 static const char __pyx_k_encode[] = "encode";
2408 static const char __pyx_k_failed[] = "failed";
2409 static const char __pyx_k_format[] = "format";
2410 static const char __pyx_k_import[] = "__import__";
2411 static const char __pyx_k_mpi4py[] = "mpi4py";
2412 static const char __pyx_k_nSpace[] = "nSpace";
2413 static const char __pyx_k_name_2[] = "__name__";
2414 static const char __pyx_k_pickle[] = "pickle";
2415 static const char __pyx_k_reduce[] = "__reduce__";
2416 static const char __pyx_k_struct[] = "struct";
2417 static const char __pyx_k_unpack[] = "unpack";
2418 static const char __pyx_k_update[] = "update";
2419 static const char __pyx_k_volume[] = "volume";
2420 static const char __pyx_k_asarray[] = "asarray";
2421 static const char __pyx_k_fortran[] = "fortran";
2422 static const char __pyx_k_memview[] = "memview";
2423 static const char __pyx_k_nLevels[] = "nLevels";
2424 static const char __pyx_k_proteus[] = "proteus";
2425 static const char __pyx_k_weights[] = "weights";
2426 static const char __pyx_k_Ellipsis[] = "Ellipsis";
2427 static const char __pyx_k_filebase[] = "filebase";
2428 static const char __pyx_k_getstate[] = "__getstate__";
2429 static const char __pyx_k_itemsize[] = "itemsize";
2430 static const char __pyx_k_pyx_type[] = "__pyx_type";
2431 static const char __pyx_k_setstate[] = "__setstate__";
2432 static const char __pyx_k_sigmaMax[] = "sigmaMax";
2433 static const char __pyx_k_TypeError[] = "TypeError";
2434 static const char __pyx_k_cmeshList[] = "cmeshList";
2435 static const char __pyx_k_enumerate[] = "enumerate";
2436 static const char __pyx_k_nodeArray[] = "nodeArray";
2437 static const char __pyx_k_pyx_state[] = "__pyx_state";
2438 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2439 static const char __pyx_k_IndexError[] = "IndexError";
2440 static const char __pyx_k_ValueError[] = "ValueError";
2441 static const char __pyx_k_cmeshTools[] = "cmeshTools";
2442 static const char __pyx_k_elementIJK[] = "elementIJK";
2443 static const char __pyx_k_pyx_result[] = "__pyx_result";
2444 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2445 static const char __pyx_k_ImportError[] = "ImportError";
2446 static const char __pyx_k_MemoryError[] = "MemoryError";
2447 static const char __pyx_k_PickleError[] = "PickleError";
2448 static const char __pyx_k_finestLevel[] = "finestLevel";
2449 static const char __pyx_k_RuntimeError[] = "RuntimeError";
2450 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2451 static const char __pyx_k_stringsource[] = "stringsource";
2452 static const char __pyx_k_triangleFlag[] = "triangleFlag";
2453 static const char __pyx_k_nEdges_global[] = "nEdges_global";
2454 static const char __pyx_k_nNodes_global[] = "nNodes_global";
2455 static const char __pyx_k_nodeStarArray[] = "nodeStarArray";
2456 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
2457 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2458 static const char __pyx_k_wrong_nLevels[] = "wrong nLevels";
2459 static const char __pyx_k_edgeNodesArray[] = "edgeNodesArray";
2460 static const char __pyx_k_nNodes_element[] = "nNodes_element";
2461 static const char __pyx_k_refineTypeFlag[] = "refineTypeFlag";
2462 static const char __pyx_k_CMultilevelMesh[] = "CMultilevelMesh";
2463 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
2464 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
2465 static const char __pyx_k_cmultilevelMesh[] = "cmultilevelMesh";
2466 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
2467 static const char __pyx_k_elementTagArray[] = "elementTagArray";
2468 static const char __pyx_k_nodeStarOffsets[] = "nodeStarOffsets";
2469 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2470 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2471 static const char __pyx_k_nElements_global[] = "nElements_global";
2472 static const char __pyx_k_nodeSupportArray[] = "nodeSupportArray";
2473 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
2474 static const char __pyx_k_nodeElementsArray[] = "nodeElementsArray";
2475 static const char __pyx_k_nodeMaterialTypes[] = "nodeMaterialTypes";
2476 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
2477 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2478 static const char __pyx_k_max_nElements_node[] = "max_nElements_node";
2479 static const char __pyx_k_nodeDiametersArray[] = "nodeDiametersArray";
2480 static const char __pyx_k_nodeElementOffsets[] = "nodeElementOffsets";
2481 static const char __pyx_k_setNewestNodeBases[] = "setNewestNodeBases";
2482 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
2483 static const char __pyx_k_elementMaterialTypes[] = "elementMaterialTypes";
2484 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
2485 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
2486 static const char __pyx_k_elementDiametersArray[] = "elementDiametersArray";
2487 static const char __pyx_k_elementNeighborsArray[] = "elementNeighborsArray";
2488 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
2489 static const char __pyx_k_elementBoundariesArray[] = "elementBoundariesArray";
2490 static const char __pyx_k_nNodes_elementBoundary[] = "nNodes_elementBoundary";
2491 static const char __pyx_k_proteus_cmeshTools_pyx[] = "proteus/cmeshTools.pyx";
2492 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
2493 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
2494 static const char __pyx_k_elementBarycentersArray[] = "elementBarycentersArray";
2495 static const char __pyx_k_elementParentsArrayList[] = "elementParentsArrayList";
2496 static const char __pyx_k_max_nNodeNeighbors_node[] = "max_nNodeNeighbors_node";
2497 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
2498 static const char __pyx_k_buildPythonMeshInterface[] = "buildPythonMeshInterface";
2499 static const char __pyx_k_elementChildrenArrayList[] = "elementChildrenArrayList";
2500 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
2501 static const char __pyx_k_elementBoundaryNodesArray[] = "elementBoundaryNodesArray";
2502 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
2503 static const char __pyx_k_elementChildrenOffsetsList[] = "elementChildrenOffsetsList";
2504 static const char __pyx_k_elementInnerDiametersArray[] = "elementInnerDiametersArray";
2505 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
2506 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
2507 static const char __pyx_k_locallyRefineMultilevelMesh[] = "locallyRefineMultilevelMesh";
2508 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
2509 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
2510 static const char __pyx_k_elementBoundaryMaterialTypes[] = "elementBoundaryMaterialTypes";
2511 static const char __pyx_k_elementBoundaryDiametersArray[] = "elementBoundaryDiametersArray";
2512 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
2513 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
2514 static const char __pyx_k_interiorElementBoundariesArray[] = "interiorElementBoundariesArray";
2515 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
2516 static const char __pyx_k_elementBoundaryBarycentersArray[] = "elementBoundaryBarycentersArray";
2517 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2518 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
2519 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
2520 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
2521 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
2522 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
2523 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
2524 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
2525 static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
2526 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
2527 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
2528 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2529 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
2530 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
2531 static const char __pyx_k_buildPythonMeshInterfaceNoArrays[] = "buildPythonMeshInterfaceNoArrays";
2532 static const char __pyx_k_buildPythonMultilevelMeshInterfa[] = "buildPythonMultilevelMeshInterface";
2533 static const char __pyx_k_elementBoundaryLocalElementBound[] = "elementBoundaryLocalElementBoundariesArray";
2534 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
2535 static const char __pyx_k_locallyRefine_nSpace_0_d_not_imp[] = "locallyRefine nSpace= {0:d} not implemented! Returning.";
2536 static const char __pyx_k_nExteriorElementBoundaries_globa[] = "nExteriorElementBoundaries_global";
2537 static const char __pyx_k_nInteriorElementBoundaries_globa[] = "nInteriorElementBoundaries_global";
2538 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2539 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2540 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2541 static const char __pyx_k_self_mesh_cannot_be_converted_to[] = "self.mesh cannot be converted to a Python object for pickling";
2542 static const char __pyx_k_self_multilevelMesh_cannot_be_co[] = "self.multilevelMesh cannot be converted to a Python object for pickling";
2543 static const char __pyx_k_setNewestNodeBases_0_d_not_imple[] = "setNewestNodeBases= {0:d} not implemented! Returning";
2544 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
2545 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2546 static PyObject *__pyx_n_s_ASCII;
2547 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2548 static PyObject *__pyx_n_s_CMesh;
2549 static PyObject *__pyx_n_s_CMultilevelMesh;
2550 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2551 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2552 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2553 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2554 static PyObject *__pyx_n_s_Comm;
2555 static PyObject *__pyx_n_s_Ellipsis;
2556 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2557 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2558 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2559 static PyObject *__pyx_n_s_ImportError;
2560 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
2561 static PyObject *__pyx_n_s_IndexError;
2562 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2563 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2564 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2565 static PyObject *__pyx_n_s_Lx;
2566 static PyObject *__pyx_n_s_Ly;
2567 static PyObject *__pyx_n_s_Lz;
2568 static PyObject *__pyx_n_s_MPI;
2569 static PyObject *__pyx_n_s_MemoryError;
2570 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2571 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2572 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2573 static PyObject *__pyx_n_b_O;
2574 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2575 static PyObject *__pyx_n_s_PickleError;
2576 static PyObject *__pyx_n_s_RuntimeError;
2577 static PyObject *__pyx_kp_b_T;
2578 static PyObject *__pyx_n_s_TypeError;
2579 static PyObject *__pyx_n_s_U_KNOT;
2580 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2581 static PyObject *__pyx_n_s_V_KNOT;
2582 static PyObject *__pyx_n_s_ValueError;
2583 static PyObject *__pyx_n_s_View_MemoryView;
2584 static PyObject *__pyx_n_s_W_KNOT;
2585 static PyObject *__pyx_kp_b__31;
2586 static PyObject *__pyx_kp_b__32;
2587 static PyObject *__pyx_kp_b__33;
2588 static PyObject *__pyx_kp_b__34;
2589 static PyObject *__pyx_kp_u__35;
2590 static PyObject *__pyx_n_s_allocate_buffer;
2591 static PyObject *__pyx_n_s_asarray;
2592 static PyObject *__pyx_n_s_base;
2593 static PyObject *__pyx_n_s_buildPythonMeshInterface;
2594 static PyObject *__pyx_n_s_buildPythonMeshInterfaceNoArrays;
2595 static PyObject *__pyx_n_s_buildPythonMultilevelMeshInterfa;
2596 static PyObject *__pyx_n_s_c;
2597 static PyObject *__pyx_n_u_c;
2598 static PyObject *__pyx_n_s_class;
2599 static PyObject *__pyx_n_s_cline_in_traceback;
2600 static PyObject *__pyx_n_s_cmesh;
2601 static PyObject *__pyx_n_s_cmeshList;
2602 static PyObject *__pyx_n_s_cmeshTools;
2603 static PyObject *__pyx_n_s_cmultilevelMesh;
2604 static PyObject *__pyx_kp_s_contiguous_and_direct;
2605 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2606 static PyObject *__pyx_n_s_dict;
2607 static PyObject *__pyx_n_s_dtype;
2608 static PyObject *__pyx_n_s_dtype_is_object;
2609 static PyObject *__pyx_n_s_edgeNodesArray;
2610 static PyObject *__pyx_n_s_elementBarycentersArray;
2611 static PyObject *__pyx_n_s_elementBoundariesArray;
2612 static PyObject *__pyx_n_s_elementBoundaryBarycentersArray;
2613 static PyObject *__pyx_n_s_elementBoundaryDiametersArray;
2614 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2615 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2616 static PyObject *__pyx_n_s_elementBoundaryMaterialTypes;
2617 static PyObject *__pyx_n_s_elementBoundaryNodesArray;
2618 static PyObject *__pyx_n_s_elementChildrenArrayList;
2619 static PyObject *__pyx_n_s_elementChildrenOffsetsList;
2620 static PyObject *__pyx_n_s_elementDiametersArray;
2621 static PyObject *__pyx_n_s_elementIJK;
2622 static PyObject *__pyx_n_s_elementInnerDiametersArray;
2623 static PyObject *__pyx_n_s_elementMaterialTypes;
2624 static PyObject *__pyx_n_s_elementNeighborsArray;
2625 static PyObject *__pyx_n_s_elementNodesArray;
2626 static PyObject *__pyx_n_s_elementParentsArrayList;
2627 static PyObject *__pyx_n_s_elementTagArray;
2628 static PyObject *__pyx_n_s_empty;
2629 static PyObject *__pyx_n_s_encode;
2630 static PyObject *__pyx_n_s_end;
2631 static PyObject *__pyx_n_s_enumerate;
2632 static PyObject *__pyx_n_s_error;
2633 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2634 static PyObject *__pyx_n_s_failed;
2635 static PyObject *__pyx_n_s_file;
2636 static PyObject *__pyx_n_s_filebase;
2637 static PyObject *__pyx_n_s_finestLevel;
2638 static PyObject *__pyx_n_s_flags;
2639 static PyObject *__pyx_n_s_format;
2640 static PyObject *__pyx_n_s_fortran;
2641 static PyObject *__pyx_n_u_fortran;
2642 static PyObject *__pyx_n_s_getstate;
2643 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2644 static PyObject *__pyx_n_s_h;
2645 static PyObject *__pyx_n_s_hMin;
2646 static PyObject *__pyx_n_s_id;
2647 static PyObject *__pyx_n_s_import;
2648 static PyObject *__pyx_n_s_int32;
2649 static PyObject *__pyx_n_s_interiorElementBoundariesArray;
2650 static PyObject *__pyx_n_s_itemsize;
2651 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2652 static PyObject *__pyx_n_s_join;
2653 static PyObject *__pyx_n_s_locallyRefineMultilevelMesh;
2654 static PyObject *__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp;
2655 static PyObject *__pyx_n_s_main;
2656 static PyObject *__pyx_n_s_max_nElements_node;
2657 static PyObject *__pyx_n_s_max_nNodeNeighbors_node;
2658 static PyObject *__pyx_n_s_memview;
2659 static PyObject *__pyx_n_s_mode;
2660 static PyObject *__pyx_n_s_mpi4py;
2661 static PyObject *__pyx_n_s_nEdges_global;
2662 static PyObject *__pyx_n_s_nElementBoundaries_element;
2663 static PyObject *__pyx_n_s_nElementBoundaries_global;
2664 static PyObject *__pyx_n_s_nElements_global;
2665 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2666 static PyObject *__pyx_n_s_nInteriorElementBoundaries_globa;
2667 static PyObject *__pyx_n_s_nLevels;
2668 static PyObject *__pyx_n_s_nNodes_element;
2669 static PyObject *__pyx_n_s_nNodes_elementBoundary;
2670 static PyObject *__pyx_n_s_nNodes_global;
2671 static PyObject *__pyx_n_s_nSpace;
2672 static PyObject *__pyx_n_s_name;
2673 static PyObject *__pyx_n_s_name_2;
2674 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2675 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2676 static PyObject *__pyx_n_s_ndim;
2677 static PyObject *__pyx_n_s_new;
2678 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2679 static PyObject *__pyx_n_s_nodeArray;
2680 static PyObject *__pyx_n_s_nodeDiametersArray;
2681 static PyObject *__pyx_n_s_nodeElementOffsets;
2682 static PyObject *__pyx_n_s_nodeElementsArray;
2683 static PyObject *__pyx_n_s_nodeMaterialTypes;
2684 static PyObject *__pyx_n_s_nodeStarArray;
2685 static PyObject *__pyx_n_s_nodeStarOffsets;
2686 static PyObject *__pyx_n_s_nodeSupportArray;
2687 static PyObject *__pyx_n_s_np;
2688 static PyObject *__pyx_n_s_numpy;
2689 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2690 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2691 static PyObject *__pyx_n_s_nx;
2692 static PyObject *__pyx_n_s_ny;
2693 static PyObject *__pyx_n_s_nz;
2694 static PyObject *__pyx_n_s_obj;
2695 static PyObject *__pyx_n_s_pack;
2696 static PyObject *__pyx_n_s_pickle;
2697 static PyObject *__pyx_n_s_print;
2698 static PyObject *__pyx_n_s_proteus;
2699 static PyObject *__pyx_kp_s_proteus_cmeshTools_pyx;
2700 static PyObject *__pyx_n_s_px;
2701 static PyObject *__pyx_n_s_py;
2702 static PyObject *__pyx_n_s_pyx_PickleError;
2703 static PyObject *__pyx_n_s_pyx_checksum;
2704 static PyObject *__pyx_n_s_pyx_getbuffer;
2705 static PyObject *__pyx_n_s_pyx_result;
2706 static PyObject *__pyx_n_s_pyx_state;
2707 static PyObject *__pyx_n_s_pyx_type;
2708 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2709 static PyObject *__pyx_n_s_pyx_vtable;
2710 static PyObject *__pyx_n_s_pz;
2711 static PyObject *__pyx_n_s_range;
2712 static PyObject *__pyx_n_s_reduce;
2713 static PyObject *__pyx_n_s_reduce_cython;
2714 static PyObject *__pyx_n_s_reduce_ex;
2715 static PyObject *__pyx_n_s_refineTypeFlag;
2716 static PyObject *__pyx_kp_u_s;
2717 static PyObject *__pyx_kp_s_self_mesh_cannot_be_converted_to;
2718 static PyObject *__pyx_kp_s_self_multilevelMesh_cannot_be_co;
2719 static PyObject *__pyx_n_s_setNewestNodeBases;
2720 static PyObject *__pyx_kp_s_setNewestNodeBases_0_d_not_imple;
2721 static PyObject *__pyx_n_s_setstate;
2722 static PyObject *__pyx_n_s_setstate_cython;
2723 static PyObject *__pyx_n_s_shape;
2724 static PyObject *__pyx_n_s_sigmaMax;
2725 static PyObject *__pyx_n_s_size;
2726 static PyObject *__pyx_n_s_start;
2727 static PyObject *__pyx_n_s_step;
2728 static PyObject *__pyx_n_s_stop;
2729 static PyObject *__pyx_kp_s_strided_and_direct;
2730 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2731 static PyObject *__pyx_kp_s_strided_and_indirect;
2732 static PyObject *__pyx_kp_s_stringsource;
2733 static PyObject *__pyx_n_s_struct;
2734 static PyObject *__pyx_n_s_test;
2735 static PyObject *__pyx_n_s_triangleFlag;
2736 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2737 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2738 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2739 static PyObject *__pyx_n_s_unpack;
2740 static PyObject *__pyx_n_s_update;
2741 static PyObject *__pyx_n_s_volume;
2742 static PyObject *__pyx_n_s_weights;
2743 static PyObject *__pyx_kp_s_wrong_nLevels;
2744 static PyObject *__pyx_n_s_zeros;
2745 static int __pyx_pf_10cmeshTools_5CMesh___init__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2746 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2buildPythonMeshInterface(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2747 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterfaceNoArrays(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2748 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2749 static int __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2750 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2751 static int __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2752 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2753 static int __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2754 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2755 static int __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2756 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2757 static int __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2758 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2759 static int __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2760 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2761 static int __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2762 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2763 static int __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2764 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2765 static int __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2766 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2767 static int __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2768 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2769 static int __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2770 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2771 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2772 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2773 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2774 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2775 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2776 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2777 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2778 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2779 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2780 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2781 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2782 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2783 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2784 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2785 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2786 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2787 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2788 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2789 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2790 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2791 static PyObject *__pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2792 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2793 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2794 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2795 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2796 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2797 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2798 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2799 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2800 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2801 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2802 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2803 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2804 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2805 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2806 static PyObject *__pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2807 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2808 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2809 static PyObject *__pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2810 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2811 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2812 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2813 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2814 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2815 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2816 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2817 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2818 static PyObject *__pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2819 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2820 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2821 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nx___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2822 static int __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2823 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2ny___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2824 static int __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2825 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2826 static int __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2827 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2px___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2828 static int __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2829 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2py___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2830 static int __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2831 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2pz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2832 static int __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2833 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2834 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2835 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2836 static PyObject *__pyx_pf_10cmeshTools_5CMesh_7weights___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2837 static int __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2838 static int __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2839 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2840 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2841 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2842 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2843 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2844 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2845 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2846 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2847 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2848 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2849 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2850 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2851 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2852 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2853 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2854 static PyObject *__pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2855 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2856 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2857 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2858 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2859 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2860 static PyObject *__pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2861 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2862 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2863 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2864 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2865 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2866 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2867 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2868 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2869 static PyObject *__pyx_pf_10cmeshTools_5CMesh_1h___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2870 static int __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2871 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4hMin___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2872 static int __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2873 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2874 static int __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2875 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6volume___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2876 static int __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2877 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2878 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2879 static PyObject *__pyx_pf_10cmeshTools_buildPythonMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /* proto */
2880 static PyObject *__pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /* proto */
2881 static int __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_nLevels); /* proto */
2882 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2883 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2884 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2885 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2886 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2887 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2888 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2889 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2890 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2891 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2892 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2893 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2894 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2895 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2896 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2897 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2898 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2899 static PyObject *__pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh); /* proto */
2900 static PyObject *__pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2901 static PyObject *__pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2902 static PyObject *__pyx_pf_10cmeshTools_10generateFromTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2903 static PyObject *__pyx_pf_10cmeshTools_12writeTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2904 static PyObject *__pyx_pf_10cmeshTools_14generateFromTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2905 static PyObject *__pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2906 static PyObject *__pyx_pf_10cmeshTools_18writeTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2907 static PyObject *__pyx_pf_10cmeshTools_20write3dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2908 static PyObject *__pyx_pf_10cmeshTools_22write2dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2909 static PyObject *__pyx_pf_10cmeshTools_24generateFromHexFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2910 static PyObject *__pyx_pf_10cmeshTools_26generateFrom3DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2911 static PyObject *__pyx_pf_10cmeshTools_28generateFrom2DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2912 static PyObject *__pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2913 static PyObject *__pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2914 static PyObject *__pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element); /* proto */
2915 static PyObject *__pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2916 static PyObject *__pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag); /* proto */
2917 static PyObject *__pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2918 static PyObject *__pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_px, int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2919 static PyObject *__pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2920 static PyObject *__pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2921 static PyObject *__pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2922 static PyObject *__pyx_pf_10cmeshTools_50computeGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2923 static PyObject *__pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2924 static PyObject *__pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2925 static PyObject *__pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2926 static PyObject *__pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2927 static PyObject *__pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2928 static PyObject *__pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2929 static PyObject *__pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2930 static PyObject *__pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh, PyArrayObject *__pyx_v_elementTagArray, int __pyx_v_refineTypeFlag); /* proto */
2931 static PyObject *__pyx_pf_10cmeshTools_68setNewestNodeBases(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh); /* proto */
2932 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2933 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2934 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
2935 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2936 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2937 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2938 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2939 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
2940 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
2941 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
2942 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
2943 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2944 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
2945 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2946 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2947 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2948 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
2949 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2950 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
2951 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
2952 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2953 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2954 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2955 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2956 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2957 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2958 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2959 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2960 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2961 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2962 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2963 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2964 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2965 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2966 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2967 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2968 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2969 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2970 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2971 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2972 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2973 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2974 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2975 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2976 static PyObject *__pyx_tp_new_10cmeshTools_CMesh(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2977 static PyObject *__pyx_tp_new_10cmeshTools_CMultilevelMesh(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2978 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2979 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2980 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2981 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2982 static PyObject *__pyx_int_0;
2983 static PyObject *__pyx_int_1;
2984 static PyObject *__pyx_int_184977713;
2985 static PyObject *__pyx_int_neg_1;
2986 static PyObject *__pyx_tuple_;
2987 static PyObject *__pyx_tuple__2;
2988 static PyObject *__pyx_tuple__3;
2989 static PyObject *__pyx_tuple__4;
2990 static PyObject *__pyx_tuple__5;
2991 static PyObject *__pyx_tuple__6;
2992 static PyObject *__pyx_tuple__7;
2993 static PyObject *__pyx_tuple__8;
2994 static PyObject *__pyx_tuple__9;
2995 static PyObject *__pyx_slice__27;
2996 static PyObject *__pyx_tuple__10;
2997 static PyObject *__pyx_tuple__11;
2998 static PyObject *__pyx_tuple__12;
2999 static PyObject *__pyx_tuple__13;
3000 static PyObject *__pyx_tuple__14;
3001 static PyObject *__pyx_tuple__15;
3002 static PyObject *__pyx_tuple__16;
3003 static PyObject *__pyx_tuple__17;
3004 static PyObject *__pyx_tuple__18;
3005 static PyObject *__pyx_tuple__19;
3006 static PyObject *__pyx_tuple__20;
3007 static PyObject *__pyx_tuple__21;
3008 static PyObject *__pyx_tuple__22;
3009 static PyObject *__pyx_tuple__23;
3010 static PyObject *__pyx_tuple__24;
3011 static PyObject *__pyx_tuple__25;
3012 static PyObject *__pyx_tuple__26;
3013 static PyObject *__pyx_tuple__28;
3014 static PyObject *__pyx_tuple__29;
3015 static PyObject *__pyx_tuple__30;
3016 static PyObject *__pyx_tuple__36;
3017 static PyObject *__pyx_tuple__38;
3018 static PyObject *__pyx_tuple__40;
3019 static PyObject *__pyx_tuple__42;
3020 static PyObject *__pyx_tuple__44;
3021 static PyObject *__pyx_tuple__46;
3022 static PyObject *__pyx_tuple__47;
3023 static PyObject *__pyx_tuple__48;
3024 static PyObject *__pyx_tuple__49;
3025 static PyObject *__pyx_tuple__50;
3026 static PyObject *__pyx_tuple__51;
3027 static PyObject *__pyx_codeobj__37;
3028 static PyObject *__pyx_codeobj__39;
3029 static PyObject *__pyx_codeobj__41;
3030 static PyObject *__pyx_codeobj__43;
3031 static PyObject *__pyx_codeobj__45;
3032 static PyObject *__pyx_codeobj__52;
3033 /* Late includes */
3034 
3035 /* "cmeshTools.pyx":12
3036  *
3037  * cdef class CMesh:
3038  * def __init__(self): # <<<<<<<<<<<<<<
3039  * self.mesh = cppm.Mesh()
3040  * cppm.initializeMesh(self.mesh)
3041  */
3042 
3043 /* Python wrapper */
3044 static int __pyx_pw_10cmeshTools_5CMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3045 static int __pyx_pw_10cmeshTools_5CMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3046  int __pyx_r;
3047  __Pyx_RefNannyDeclarations
3048  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3049  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
3050  __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
3051  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
3052  __pyx_r = __pyx_pf_10cmeshTools_5CMesh___init__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
3053 
3054  /* function exit code */
3055  __Pyx_RefNannyFinishContext();
3056  return __pyx_r;
3057 }
3058 
3059 static int __pyx_pf_10cmeshTools_5CMesh___init__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
3060  int __pyx_r;
3061  __Pyx_RefNannyDeclarations
3062  struct Mesh __pyx_t_1;
3063  __Pyx_RefNannySetupContext("__init__", 0);
3064 
3065  /* "cmeshTools.pyx":13
3066  * cdef class CMesh:
3067  * def __init__(self):
3068  * self.mesh = cppm.Mesh() # <<<<<<<<<<<<<<
3069  * cppm.initializeMesh(self.mesh)
3070  *
3071  */
3072  __pyx_v_self->mesh = __pyx_t_1;
3073 
3074  /* "cmeshTools.pyx":14
3075  * def __init__(self):
3076  * self.mesh = cppm.Mesh()
3077  * cppm.initializeMesh(self.mesh) # <<<<<<<<<<<<<<
3078  *
3079  * def buildPythonMeshInterface(self):
3080  */
3081  initializeMesh(__pyx_v_self->mesh);
3082 
3083  /* "cmeshTools.pyx":12
3084  *
3085  * cdef class CMesh:
3086  * def __init__(self): # <<<<<<<<<<<<<<
3087  * self.mesh = cppm.Mesh()
3088  * cppm.initializeMesh(self.mesh)
3089  */
3090 
3091  /* function exit code */
3092  __pyx_r = 0;
3093  __Pyx_RefNannyFinishContext();
3094  return __pyx_r;
3095 }
3096 
3097 /* "cmeshTools.pyx":16
3098  * cppm.initializeMesh(self.mesh)
3099  *
3100  * def buildPythonMeshInterface(self): # <<<<<<<<<<<<<<
3101  * cdef int dim1
3102  * self.nElements_global = self.mesh.nElements_global
3103  */
3104 
3105 /* Python wrapper */
3106 static PyObject *__pyx_pw_10cmeshTools_5CMesh_3buildPythonMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3107 static PyObject *__pyx_pw_10cmeshTools_5CMesh_3buildPythonMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3108  PyObject *__pyx_r = 0;
3109  __Pyx_RefNannyDeclarations
3110  __Pyx_RefNannySetupContext("buildPythonMeshInterface (wrapper)", 0);
3111  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2buildPythonMeshInterface(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
3112 
3113  /* function exit code */
3114  __Pyx_RefNannyFinishContext();
3115  return __pyx_r;
3116 }
3117 
3118 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2buildPythonMeshInterface(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
3119  PyObject *__pyx_r = NULL;
3120  __Pyx_RefNannyDeclarations
3121  int __pyx_t_1;
3122  PyObject *__pyx_t_2 = NULL;
3123  PyObject *__pyx_t_3 = NULL;
3124  PyObject *__pyx_t_4 = NULL;
3125  int *__pyx_t_5;
3126  struct __pyx_array_obj *__pyx_t_6 = NULL;
3127  PyObject *__pyx_t_7 = NULL;
3128  int __pyx_t_8;
3129  double *__pyx_t_9;
3130  double __pyx_t_10;
3131  __Pyx_RefNannySetupContext("buildPythonMeshInterface", 0);
3132 
3133  /* "cmeshTools.pyx":18
3134  * def buildPythonMeshInterface(self):
3135  * cdef int dim1
3136  * self.nElements_global = self.mesh.nElements_global # <<<<<<<<<<<<<<
3137  * self.nNodes_global = self.mesh.nNodes_global
3138  * self.nNodes_element = self.mesh.nNodes_element
3139  */
3140  __pyx_t_1 = __pyx_v_self->mesh.nElements_global;
3141  __pyx_v_self->nElements_global = __pyx_t_1;
3142 
3143  /* "cmeshTools.pyx":19
3144  * cdef int dim1
3145  * self.nElements_global = self.mesh.nElements_global
3146  * self.nNodes_global = self.mesh.nNodes_global # <<<<<<<<<<<<<<
3147  * self.nNodes_element = self.mesh.nNodes_element
3148  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3149  */
3150  __pyx_t_1 = __pyx_v_self->mesh.nNodes_global;
3151  __pyx_v_self->nNodes_global = __pyx_t_1;
3152 
3153  /* "cmeshTools.pyx":20
3154  * self.nElements_global = self.mesh.nElements_global
3155  * self.nNodes_global = self.mesh.nNodes_global
3156  * self.nNodes_element = self.mesh.nNodes_element # <<<<<<<<<<<<<<
3157  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3158  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3159  */
3160  __pyx_t_1 = __pyx_v_self->mesh.nNodes_element;
3161  __pyx_v_self->nNodes_element = __pyx_t_1;
3162 
3163  /* "cmeshTools.pyx":21
3164  * self.nNodes_global = self.mesh.nNodes_global
3165  * self.nNodes_element = self.mesh.nNodes_element
3166  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
3167  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3168  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3169  */
3170  __pyx_t_1 = __pyx_v_self->mesh.nNodes_elementBoundary;
3171  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
3172 
3173  /* "cmeshTools.pyx":22
3174  * self.nNodes_element = self.mesh.nNodes_element
3175  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3176  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element # <<<<<<<<<<<<<<
3177  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3178  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3179  */
3180  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_element;
3181  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
3182 
3183  /* "cmeshTools.pyx":23
3184  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3185  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3186  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
3187  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3188  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3189  */
3190  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_global;
3191  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
3192 
3193  /* "cmeshTools.pyx":24
3194  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3195  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3196  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global # <<<<<<<<<<<<<<
3197  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3198  * self.max_nElements_node = self.mesh.max_nElements_node
3199  */
3200  __pyx_t_1 = __pyx_v_self->mesh.nInteriorElementBoundaries_global;
3201  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
3202 
3203  /* "cmeshTools.pyx":25
3204  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3205  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3206  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global # <<<<<<<<<<<<<<
3207  * self.max_nElements_node = self.mesh.max_nElements_node
3208  * self.nEdges_global = self.mesh.nEdges_global
3209  */
3210  __pyx_t_1 = __pyx_v_self->mesh.nExteriorElementBoundaries_global;
3211  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
3212 
3213  /* "cmeshTools.pyx":26
3214  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3215  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3216  * self.max_nElements_node = self.mesh.max_nElements_node # <<<<<<<<<<<<<<
3217  * self.nEdges_global = self.mesh.nEdges_global
3218  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3219  */
3220  __pyx_t_1 = __pyx_v_self->mesh.max_nElements_node;
3221  __pyx_v_self->max_nElements_node = __pyx_t_1;
3222 
3223  /* "cmeshTools.pyx":27
3224  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3225  * self.max_nElements_node = self.mesh.max_nElements_node
3226  * self.nEdges_global = self.mesh.nEdges_global # <<<<<<<<<<<<<<
3227  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3228  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3229  */
3230  __pyx_t_1 = __pyx_v_self->mesh.nEdges_global;
3231  __pyx_v_self->nEdges_global = __pyx_t_1;
3232 
3233  /* "cmeshTools.pyx":28
3234  * self.max_nElements_node = self.mesh.max_nElements_node
3235  * self.nEdges_global = self.mesh.nEdges_global
3236  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node # <<<<<<<<<<<<<<
3237  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3238  * if self.mesh.nodeElementOffsets != NULL:
3239  */
3240  __pyx_t_1 = __pyx_v_self->mesh.max_nNodeNeighbors_node;
3241  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
3242 
3243  /* "cmeshTools.pyx":29
3244  * self.nEdges_global = self.mesh.nEdges_global
3245  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3246  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray) # <<<<<<<<<<<<<<
3247  * if self.mesh.nodeElementOffsets != NULL:
3248  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3249  */
3250  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 29, __pyx_L1_error)
3251  __Pyx_GOTREF(__pyx_t_3);
3252  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 29, __pyx_L1_error)
3253  __Pyx_GOTREF(__pyx_t_4);
3254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3255  __pyx_t_5 = __pyx_v_self->mesh.elementNodesArray;
3256  if (!__pyx_t_5) {
3257  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3258  __PYX_ERR(1, 29, __pyx_L1_error)
3259  }
3260  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3261  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nNodes_element));
3262  if (unlikely(!__pyx_t_7 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 29, __pyx_L1_error)
3263  __Pyx_GOTREF(__pyx_t_7);
3264  __Pyx_GOTREF(__pyx_t_3);
3265  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3266  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 29, __pyx_L1_error)
3267  __Pyx_GOTREF(__pyx_t_6);
3268  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3269  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3270  __pyx_t_7 = NULL;
3271  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3272  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
3273  if (likely(__pyx_t_7)) {
3274  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3275  __Pyx_INCREF(__pyx_t_7);
3276  __Pyx_INCREF(function);
3277  __Pyx_DECREF_SET(__pyx_t_4, function);
3278  }
3279  }
3280  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
3281  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3282  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3283  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 29, __pyx_L1_error)
3284  __Pyx_GOTREF(__pyx_t_2);
3285  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3286  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 29, __pyx_L1_error)
3287  __Pyx_GIVEREF(__pyx_t_2);
3288  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
3289  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
3290  __pyx_v_self->elementNodesArray = ((PyArrayObject *)__pyx_t_2);
3291  __pyx_t_2 = 0;
3292 
3293  /* "cmeshTools.pyx":30
3294  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3295  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3296  * if self.mesh.nodeElementOffsets != NULL: # <<<<<<<<<<<<<<
3297  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3298  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3299  */
3300  __pyx_t_8 = ((__pyx_v_self->mesh.nodeElementOffsets != NULL) != 0);
3301  if (__pyx_t_8) {
3302 
3303  /* "cmeshTools.pyx":31
3304  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3305  * if self.mesh.nodeElementOffsets != NULL:
3306  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray) # <<<<<<<<<<<<<<
3307  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3308  * else:
3309  */
3310  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 31, __pyx_L1_error)
3311  __Pyx_GOTREF(__pyx_t_4);
3312  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 31, __pyx_L1_error)
3313  __Pyx_GOTREF(__pyx_t_7);
3314  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3315  __pyx_t_5 = __pyx_v_self->mesh.nodeElementsArray;
3316  if (!__pyx_t_5) {
3317  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3318  __PYX_ERR(1, 31, __pyx_L1_error)
3319  }
3320  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3321  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nodeElementOffsets[__pyx_v_self->mesh.nNodes_global])));
3322  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 31, __pyx_L1_error)
3323  __Pyx_GOTREF(__pyx_t_3);
3324  __Pyx_GOTREF(__pyx_t_4);
3325  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3326  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 31, __pyx_L1_error)
3327  __Pyx_GOTREF(__pyx_t_6);
3328  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3329  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3330  __pyx_t_3 = NULL;
3331  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3332  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
3333  if (likely(__pyx_t_3)) {
3334  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3335  __Pyx_INCREF(__pyx_t_3);
3336  __Pyx_INCREF(function);
3337  __Pyx_DECREF_SET(__pyx_t_7, function);
3338  }
3339  }
3340  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3341  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3342  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3343  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 31, __pyx_L1_error)
3344  __Pyx_GOTREF(__pyx_t_2);
3345  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3346  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 31, __pyx_L1_error)
3347  __Pyx_GIVEREF(__pyx_t_2);
3348  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
3349  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
3350  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_2);
3351  __pyx_t_2 = 0;
3352 
3353  /* "cmeshTools.pyx":32
3354  * if self.mesh.nodeElementOffsets != NULL:
3355  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3356  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets) # <<<<<<<<<<<<<<
3357  * else:
3358  * self.nodeElementsArray = np.empty(0, dtype=np.int32)
3359  */
3360  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 32, __pyx_L1_error)
3361  __Pyx_GOTREF(__pyx_t_7);
3362  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 32, __pyx_L1_error)
3363  __Pyx_GOTREF(__pyx_t_3);
3364  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3365  __pyx_t_5 = __pyx_v_self->mesh.nodeElementOffsets;
3366  if (!__pyx_t_5) {
3367  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3368  __PYX_ERR(1, 32, __pyx_L1_error)
3369  }
3370  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3371  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nNodes_global + 1)));
3372  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 32, __pyx_L1_error)
3373  __Pyx_GOTREF(__pyx_t_4);
3374  __Pyx_GOTREF(__pyx_t_7);
3375  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
3376  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 32, __pyx_L1_error)
3377  __Pyx_GOTREF(__pyx_t_6);
3378  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3379  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3380  __pyx_t_4 = NULL;
3381  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3382  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3383  if (likely(__pyx_t_4)) {
3384  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3385  __Pyx_INCREF(__pyx_t_4);
3386  __Pyx_INCREF(function);
3387  __Pyx_DECREF_SET(__pyx_t_3, function);
3388  }
3389  }
3390  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3391  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3392  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3393  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 32, __pyx_L1_error)
3394  __Pyx_GOTREF(__pyx_t_2);
3395  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3396  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 32, __pyx_L1_error)
3397  __Pyx_GIVEREF(__pyx_t_2);
3398  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
3399  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
3400  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_2);
3401  __pyx_t_2 = 0;
3402 
3403  /* "cmeshTools.pyx":30
3404  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3405  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3406  * if self.mesh.nodeElementOffsets != NULL: # <<<<<<<<<<<<<<
3407  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3408  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3409  */
3410  goto __pyx_L3;
3411  }
3412 
3413  /* "cmeshTools.pyx":34
3414  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3415  * else:
3416  * self.nodeElementsArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3417  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
3418  *
3419  */
3420  /*else*/ {
3421  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 34, __pyx_L1_error)
3422  __Pyx_GOTREF(__pyx_t_2);
3423  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 34, __pyx_L1_error)
3424  __Pyx_GOTREF(__pyx_t_3);
3425  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3426  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 34, __pyx_L1_error)
3427  __Pyx_GOTREF(__pyx_t_2);
3428  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
3429  __Pyx_GOTREF(__pyx_t_4);
3430  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 34, __pyx_L1_error)
3431  __Pyx_GOTREF(__pyx_t_7);
3432  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3433  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
3434  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3435  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 34, __pyx_L1_error)
3436  __Pyx_GOTREF(__pyx_t_7);
3437  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3438  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3439  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 34, __pyx_L1_error)
3440  __Pyx_GIVEREF(__pyx_t_7);
3441  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
3442  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
3443  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_7);
3444  __pyx_t_7 = 0;
3445 
3446  /* "cmeshTools.pyx":35
3447  * else:
3448  * self.nodeElementsArray = np.empty(0, dtype=np.int32)
3449  * self.nodeElementOffsets = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3450  *
3451  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3452  */
3453  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 35, __pyx_L1_error)
3454  __Pyx_GOTREF(__pyx_t_7);
3455  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error)
3456  __Pyx_GOTREF(__pyx_t_2);
3457  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3458  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 35, __pyx_L1_error)
3459  __Pyx_GOTREF(__pyx_t_7);
3460  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 35, __pyx_L1_error)
3461  __Pyx_GOTREF(__pyx_t_3);
3462  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 35, __pyx_L1_error)
3463  __Pyx_GOTREF(__pyx_t_4);
3464  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3465  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(1, 35, __pyx_L1_error)
3466  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3467  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 35, __pyx_L1_error)
3468  __Pyx_GOTREF(__pyx_t_4);
3469  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3470  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3471  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 35, __pyx_L1_error)
3472  __Pyx_GIVEREF(__pyx_t_4);
3473  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
3474  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
3475  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_4);
3476  __pyx_t_4 = 0;
3477  }
3478  __pyx_L3:;
3479 
3480  /* "cmeshTools.pyx":37
3481  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
3482  *
3483  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray) # <<<<<<<<<<<<<<
3484  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3485  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3486  */
3487  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 37, __pyx_L1_error)
3488  __Pyx_GOTREF(__pyx_t_7);
3489  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error)
3490  __Pyx_GOTREF(__pyx_t_2);
3491  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3492  __pyx_t_5 = __pyx_v_self->mesh.elementNeighborsArray;
3493  if (!__pyx_t_5) {
3494  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3495  __PYX_ERR(1, 37, __pyx_L1_error)
3496  }
3497  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3498  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_element));
3499  if (unlikely(!__pyx_t_3 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 37, __pyx_L1_error)
3500  __Pyx_GOTREF(__pyx_t_3);
3501  __Pyx_GOTREF(__pyx_t_7);
3502  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3503  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 37, __pyx_L1_error)
3504  __Pyx_GOTREF(__pyx_t_6);
3505  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3506  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3507  __pyx_t_3 = NULL;
3508  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3509  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3510  if (likely(__pyx_t_3)) {
3511  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3512  __Pyx_INCREF(__pyx_t_3);
3513  __Pyx_INCREF(function);
3514  __Pyx_DECREF_SET(__pyx_t_2, function);
3515  }
3516  }
3517  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3518  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3519  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3520  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 37, __pyx_L1_error)
3521  __Pyx_GOTREF(__pyx_t_4);
3522  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3523  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 37, __pyx_L1_error)
3524  __Pyx_GIVEREF(__pyx_t_4);
3525  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
3526  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
3527  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)__pyx_t_4);
3528  __pyx_t_4 = 0;
3529 
3530  /* "cmeshTools.pyx":38
3531  *
3532  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3533  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray) # <<<<<<<<<<<<<<
3534  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3535  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3536  */
3537  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 38, __pyx_L1_error)
3538  __Pyx_GOTREF(__pyx_t_2);
3539  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 38, __pyx_L1_error)
3540  __Pyx_GOTREF(__pyx_t_3);
3541  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3542  __pyx_t_5 = __pyx_v_self->mesh.elementBoundariesArray;
3543  if (!__pyx_t_5) {
3544  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3545  __PYX_ERR(1, 38, __pyx_L1_error)
3546  }
3547  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3548  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_element));
3549  if (unlikely(!__pyx_t_7 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 38, __pyx_L1_error)
3550  __Pyx_GOTREF(__pyx_t_7);
3551  __Pyx_GOTREF(__pyx_t_2);
3552  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3553  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 38, __pyx_L1_error)
3554  __Pyx_GOTREF(__pyx_t_6);
3555  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3556  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3557  __pyx_t_7 = NULL;
3558  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3559  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
3560  if (likely(__pyx_t_7)) {
3561  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3562  __Pyx_INCREF(__pyx_t_7);
3563  __Pyx_INCREF(function);
3564  __Pyx_DECREF_SET(__pyx_t_3, function);
3565  }
3566  }
3567  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3568  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3569  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3570  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 38, __pyx_L1_error)
3571  __Pyx_GOTREF(__pyx_t_4);
3572  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3573  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 38, __pyx_L1_error)
3574  __Pyx_GIVEREF(__pyx_t_4);
3575  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
3576  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
3577  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3578  __pyx_t_4 = 0;
3579 
3580  /* "cmeshTools.pyx":39
3581  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3582  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3583  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray) # <<<<<<<<<<<<<<
3584  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3585  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3586  */
3587  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 39, __pyx_L1_error)
3588  __Pyx_GOTREF(__pyx_t_3);
3589  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 39, __pyx_L1_error)
3590  __Pyx_GOTREF(__pyx_t_7);
3591  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3592  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryNodesArray;
3593  if (!__pyx_t_5) {
3594  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3595  __PYX_ERR(1, 39, __pyx_L1_error)
3596  }
3597  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3598  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)__pyx_v_self->mesh.nNodes_elementBoundary));
3599  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 39, __pyx_L1_error)
3600  __Pyx_GOTREF(__pyx_t_2);
3601  __Pyx_GOTREF(__pyx_t_3);
3602  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3603  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 39, __pyx_L1_error)
3604  __Pyx_GOTREF(__pyx_t_6);
3605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3606  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3607  __pyx_t_2 = NULL;
3608  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3609  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3610  if (likely(__pyx_t_2)) {
3611  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3612  __Pyx_INCREF(__pyx_t_2);
3613  __Pyx_INCREF(function);
3614  __Pyx_DECREF_SET(__pyx_t_7, function);
3615  }
3616  }
3617  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3618  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3619  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3620  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 39, __pyx_L1_error)
3621  __Pyx_GOTREF(__pyx_t_4);
3622  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3623  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 39, __pyx_L1_error)
3624  __Pyx_GIVEREF(__pyx_t_4);
3625  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
3626  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
3627  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)__pyx_t_4);
3628  __pyx_t_4 = 0;
3629 
3630  /* "cmeshTools.pyx":40
3631  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3632  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3633  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray) # <<<<<<<<<<<<<<
3634  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3635  * if self.mesh.nInteriorElementBoundaries_global:
3636  */
3637  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 40, __pyx_L1_error)
3638  __Pyx_GOTREF(__pyx_t_7);
3639  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 40, __pyx_L1_error)
3640  __Pyx_GOTREF(__pyx_t_2);
3641  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3642  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryElementsArray;
3643  if (!__pyx_t_5) {
3644  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3645  __PYX_ERR(1, 40, __pyx_L1_error)
3646  }
3647  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3648  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)2));
3649  if (unlikely(!__pyx_t_3 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 40, __pyx_L1_error)
3650  __Pyx_GOTREF(__pyx_t_3);
3651  __Pyx_GOTREF(__pyx_t_7);
3652  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3653  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 40, __pyx_L1_error)
3654  __Pyx_GOTREF(__pyx_t_6);
3655  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3656  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3657  __pyx_t_3 = NULL;
3658  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3659  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3660  if (likely(__pyx_t_3)) {
3661  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3662  __Pyx_INCREF(__pyx_t_3);
3663  __Pyx_INCREF(function);
3664  __Pyx_DECREF_SET(__pyx_t_2, function);
3665  }
3666  }
3667  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3668  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3669  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3670  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 40, __pyx_L1_error)
3671  __Pyx_GOTREF(__pyx_t_4);
3672  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3673  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 40, __pyx_L1_error)
3674  __Pyx_GIVEREF(__pyx_t_4);
3675  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
3676  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
3677  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)__pyx_t_4);
3678  __pyx_t_4 = 0;
3679 
3680  /* "cmeshTools.pyx":41
3681  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3682  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3683  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray) # <<<<<<<<<<<<<<
3684  * if self.mesh.nInteriorElementBoundaries_global:
3685  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3686  */
3687  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error)
3688  __Pyx_GOTREF(__pyx_t_2);
3689  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 41, __pyx_L1_error)
3690  __Pyx_GOTREF(__pyx_t_3);
3691  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3692  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryLocalElementBoundariesArray;
3693  if (!__pyx_t_5) {
3694  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3695  __PYX_ERR(1, 41, __pyx_L1_error)
3696  }
3697  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3698  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)2));
3699  if (unlikely(!__pyx_t_7 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 41, __pyx_L1_error)
3700  __Pyx_GOTREF(__pyx_t_7);
3701  __Pyx_GOTREF(__pyx_t_2);
3702  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3703  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 41, __pyx_L1_error)
3704  __Pyx_GOTREF(__pyx_t_6);
3705  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3706  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3707  __pyx_t_7 = NULL;
3708  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3709  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
3710  if (likely(__pyx_t_7)) {
3711  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3712  __Pyx_INCREF(__pyx_t_7);
3713  __Pyx_INCREF(function);
3714  __Pyx_DECREF_SET(__pyx_t_3, function);
3715  }
3716  }
3717  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3718  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3719  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3720  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 41, __pyx_L1_error)
3721  __Pyx_GOTREF(__pyx_t_4);
3722  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3723  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 41, __pyx_L1_error)
3724  __Pyx_GIVEREF(__pyx_t_4);
3725  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
3726  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
3727  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3728  __pyx_t_4 = 0;
3729 
3730  /* "cmeshTools.pyx":42
3731  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3732  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3733  * if self.mesh.nInteriorElementBoundaries_global: # <<<<<<<<<<<<<<
3734  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3735  * else:
3736  */
3737  __pyx_t_8 = (__pyx_v_self->mesh.nInteriorElementBoundaries_global != 0);
3738  if (__pyx_t_8) {
3739 
3740  /* "cmeshTools.pyx":43
3741  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3742  * if self.mesh.nInteriorElementBoundaries_global:
3743  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray) # <<<<<<<<<<<<<<
3744  * else:
3745  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3746  */
3747  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 43, __pyx_L1_error)
3748  __Pyx_GOTREF(__pyx_t_3);
3749  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 43, __pyx_L1_error)
3750  __Pyx_GOTREF(__pyx_t_7);
3751  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3752  __pyx_t_5 = __pyx_v_self->mesh.interiorElementBoundariesArray;
3753  if (!__pyx_t_5) {
3754  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3755  __PYX_ERR(1, 43, __pyx_L1_error)
3756  }
3757  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3758  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nInteriorElementBoundaries_global));
3759  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 43, __pyx_L1_error)
3760  __Pyx_GOTREF(__pyx_t_2);
3761  __Pyx_GOTREF(__pyx_t_3);
3762  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3763  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 43, __pyx_L1_error)
3764  __Pyx_GOTREF(__pyx_t_6);
3765  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3766  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3767  __pyx_t_2 = NULL;
3768  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3769  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3770  if (likely(__pyx_t_2)) {
3771  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3772  __Pyx_INCREF(__pyx_t_2);
3773  __Pyx_INCREF(function);
3774  __Pyx_DECREF_SET(__pyx_t_7, function);
3775  }
3776  }
3777  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3778  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3779  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3780  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 43, __pyx_L1_error)
3781  __Pyx_GOTREF(__pyx_t_4);
3782  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3783  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 43, __pyx_L1_error)
3784  __Pyx_GIVEREF(__pyx_t_4);
3785  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
3786  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
3787  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3788  __pyx_t_4 = 0;
3789 
3790  /* "cmeshTools.pyx":42
3791  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3792  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3793  * if self.mesh.nInteriorElementBoundaries_global: # <<<<<<<<<<<<<<
3794  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3795  * else:
3796  */
3797  goto __pyx_L4;
3798  }
3799 
3800  /* "cmeshTools.pyx":45
3801  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3802  * else:
3803  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3804  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3805  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3806  */
3807  /*else*/ {
3808  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 45, __pyx_L1_error)
3809  __Pyx_GOTREF(__pyx_t_4);
3810  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 45, __pyx_L1_error)
3811  __Pyx_GOTREF(__pyx_t_7);
3812  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3813  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 45, __pyx_L1_error)
3814  __Pyx_GOTREF(__pyx_t_4);
3815  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error)
3816  __Pyx_GOTREF(__pyx_t_2);
3817  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 45, __pyx_L1_error)
3818  __Pyx_GOTREF(__pyx_t_3);
3819  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3820  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(1, 45, __pyx_L1_error)
3821  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3822  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple_, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 45, __pyx_L1_error)
3823  __Pyx_GOTREF(__pyx_t_3);
3824  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3825  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3826  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 45, __pyx_L1_error)
3827  __Pyx_GIVEREF(__pyx_t_3);
3828  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
3829  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
3830  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_3);
3831  __pyx_t_3 = 0;
3832  }
3833  __pyx_L4:;
3834 
3835  /* "cmeshTools.pyx":46
3836  * else:
3837  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3838  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray) # <<<<<<<<<<<<<<
3839  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3840  * if self.mesh.nodeStarOffsets != NULL:
3841  */
3842  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 46, __pyx_L1_error)
3843  __Pyx_GOTREF(__pyx_t_4);
3844  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 46, __pyx_L1_error)
3845  __Pyx_GOTREF(__pyx_t_7);
3846  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3847  __pyx_t_5 = __pyx_v_self->mesh.exteriorElementBoundariesArray;
3848  if (!__pyx_t_5) {
3849  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3850  __PYX_ERR(1, 46, __pyx_L1_error)
3851  }
3852  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3853  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nExteriorElementBoundaries_global));
3854  if (unlikely(!__pyx_t_2 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 46, __pyx_L1_error)
3855  __Pyx_GOTREF(__pyx_t_2);
3856  __Pyx_GOTREF(__pyx_t_4);
3857  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3858  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 46, __pyx_L1_error)
3859  __Pyx_GOTREF(__pyx_t_6);
3860  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3861  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3862  __pyx_t_2 = NULL;
3863  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3864  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3865  if (likely(__pyx_t_2)) {
3866  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3867  __Pyx_INCREF(__pyx_t_2);
3868  __Pyx_INCREF(function);
3869  __Pyx_DECREF_SET(__pyx_t_7, function);
3870  }
3871  }
3872  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3873  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3874  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3875  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 46, __pyx_L1_error)
3876  __Pyx_GOTREF(__pyx_t_3);
3877  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3878  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 46, __pyx_L1_error)
3879  __Pyx_GIVEREF(__pyx_t_3);
3880  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
3881  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
3882  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)__pyx_t_3);
3883  __pyx_t_3 = 0;
3884 
3885  /* "cmeshTools.pyx":47
3886  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3887  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3888  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray) # <<<<<<<<<<<<<<
3889  * if self.mesh.nodeStarOffsets != NULL:
3890  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
3891  */
3892  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 47, __pyx_L1_error)
3893  __Pyx_GOTREF(__pyx_t_7);
3894  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 47, __pyx_L1_error)
3895  __Pyx_GOTREF(__pyx_t_2);
3896  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3897  __pyx_t_5 = __pyx_v_self->mesh.edgeNodesArray;
3898  if (!__pyx_t_5) {
3899  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3900  __PYX_ERR(1, 47, __pyx_L1_error)
3901  }
3902  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3903  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nEdges_global), ((Py_ssize_t)2));
3904  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 47, __pyx_L1_error)
3905  __Pyx_GOTREF(__pyx_t_4);
3906  __Pyx_GOTREF(__pyx_t_7);
3907  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
3908  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 47, __pyx_L1_error)
3909  __Pyx_GOTREF(__pyx_t_6);
3910  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3911  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3912  __pyx_t_4 = NULL;
3913  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3914  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
3915  if (likely(__pyx_t_4)) {
3916  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3917  __Pyx_INCREF(__pyx_t_4);
3918  __Pyx_INCREF(function);
3919  __Pyx_DECREF_SET(__pyx_t_2, function);
3920  }
3921  }
3922  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3923  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3924  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3925  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
3926  __Pyx_GOTREF(__pyx_t_3);
3927  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3928  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 47, __pyx_L1_error)
3929  __Pyx_GIVEREF(__pyx_t_3);
3930  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
3931  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
3932  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)__pyx_t_3);
3933  __pyx_t_3 = 0;
3934 
3935  /* "cmeshTools.pyx":48
3936  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3937  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3938  * if self.mesh.nodeStarOffsets != NULL: # <<<<<<<<<<<<<<
3939  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
3940  * else:
3941  */
3942  __pyx_t_8 = ((__pyx_v_self->mesh.nodeStarOffsets != NULL) != 0);
3943  if (__pyx_t_8) {
3944 
3945  /* "cmeshTools.pyx":49
3946  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3947  * if self.mesh.nodeStarOffsets != NULL:
3948  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray) # <<<<<<<<<<<<<<
3949  * else:
3950  * self.nodeStarArray = np.empty(0, dtype=np.int32)
3951  */
3952  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 49, __pyx_L1_error)
3953  __Pyx_GOTREF(__pyx_t_2);
3954  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 49, __pyx_L1_error)
3955  __Pyx_GOTREF(__pyx_t_4);
3956  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3957  __pyx_t_5 = __pyx_v_self->mesh.nodeStarArray;
3958  if (!__pyx_t_5) {
3959  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3960  __PYX_ERR(1, 49, __pyx_L1_error)
3961  }
3962  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3963  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nodeStarOffsets[__pyx_v_self->mesh.nNodes_global])));
3964  if (unlikely(!__pyx_t_7 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 49, __pyx_L1_error)
3965  __Pyx_GOTREF(__pyx_t_7);
3966  __Pyx_GOTREF(__pyx_t_2);
3967  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3968  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 49, __pyx_L1_error)
3969  __Pyx_GOTREF(__pyx_t_6);
3970  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3971  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3972  __pyx_t_7 = NULL;
3973  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3974  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
3975  if (likely(__pyx_t_7)) {
3976  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3977  __Pyx_INCREF(__pyx_t_7);
3978  __Pyx_INCREF(function);
3979  __Pyx_DECREF_SET(__pyx_t_4, function);
3980  }
3981  }
3982  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
3983  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3984  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3985  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 49, __pyx_L1_error)
3986  __Pyx_GOTREF(__pyx_t_3);
3987  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3988  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 49, __pyx_L1_error)
3989  __Pyx_GIVEREF(__pyx_t_3);
3990  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
3991  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
3992  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_3);
3993  __pyx_t_3 = 0;
3994 
3995  /* "cmeshTools.pyx":48
3996  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3997  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3998  * if self.mesh.nodeStarOffsets != NULL: # <<<<<<<<<<<<<<
3999  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
4000  * else:
4001  */
4002  goto __pyx_L5;
4003  }
4004 
4005  /* "cmeshTools.pyx":51
4006  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
4007  * else:
4008  * self.nodeStarArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
4009  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4010  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4011  */
4012  /*else*/ {
4013  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 51, __pyx_L1_error)
4014  __Pyx_GOTREF(__pyx_t_3);
4015  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 51, __pyx_L1_error)
4016  __Pyx_GOTREF(__pyx_t_4);
4017  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4018  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 51, __pyx_L1_error)
4019  __Pyx_GOTREF(__pyx_t_3);
4020  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 51, __pyx_L1_error)
4021  __Pyx_GOTREF(__pyx_t_7);
4022  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 51, __pyx_L1_error)
4023  __Pyx_GOTREF(__pyx_t_2);
4024  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4025  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(1, 51, __pyx_L1_error)
4026  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4027  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple_, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 51, __pyx_L1_error)
4028  __Pyx_GOTREF(__pyx_t_2);
4029  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4030  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4031  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 51, __pyx_L1_error)
4032  __Pyx_GIVEREF(__pyx_t_2);
4033  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
4034  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
4035  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_2);
4036  __pyx_t_2 = 0;
4037  }
4038  __pyx_L5:;
4039 
4040  /* "cmeshTools.pyx":52
4041  * else:
4042  * self.nodeStarArray = np.empty(0, dtype=np.int32)
4043  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets) # <<<<<<<<<<<<<<
4044  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4045  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4046  */
4047  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
4048  __Pyx_GOTREF(__pyx_t_3);
4049  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 52, __pyx_L1_error)
4050  __Pyx_GOTREF(__pyx_t_4);
4051  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4052  __pyx_t_5 = __pyx_v_self->mesh.nodeStarOffsets;
4053  if (!__pyx_t_5) {
4054  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4055  __PYX_ERR(1, 52, __pyx_L1_error)
4056  }
4057  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4058  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nNodes_global + 1)));
4059  if (unlikely(!__pyx_t_7 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 52, __pyx_L1_error)
4060  __Pyx_GOTREF(__pyx_t_7);
4061  __Pyx_GOTREF(__pyx_t_3);
4062  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
4063  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 52, __pyx_L1_error)
4064  __Pyx_GOTREF(__pyx_t_6);
4065  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4066  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4067  __pyx_t_7 = NULL;
4068  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4069  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
4070  if (likely(__pyx_t_7)) {
4071  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4072  __Pyx_INCREF(__pyx_t_7);
4073  __Pyx_INCREF(function);
4074  __Pyx_DECREF_SET(__pyx_t_4, function);
4075  }
4076  }
4077  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4078  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4079  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4080  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error)
4081  __Pyx_GOTREF(__pyx_t_2);
4082  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4083  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 52, __pyx_L1_error)
4084  __Pyx_GIVEREF(__pyx_t_2);
4085  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
4086  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
4087  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)__pyx_t_2);
4088  __pyx_t_2 = 0;
4089 
4090  /* "cmeshTools.pyx":53
4091  * self.nodeStarArray = np.empty(0, dtype=np.int32)
4092  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4093  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes) # <<<<<<<<<<<<<<
4094  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4095  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4096  */
4097  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error)
4098  __Pyx_GOTREF(__pyx_t_4);
4099  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 53, __pyx_L1_error)
4100  __Pyx_GOTREF(__pyx_t_7);
4101  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4102  __pyx_t_5 = __pyx_v_self->mesh.elementMaterialTypes;
4103  if (!__pyx_t_5) {
4104  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4105  __PYX_ERR(1, 53, __pyx_L1_error)
4106  }
4107  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4108  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4109  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 53, __pyx_L1_error)
4110  __Pyx_GOTREF(__pyx_t_3);
4111  __Pyx_GOTREF(__pyx_t_4);
4112  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
4113  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 53, __pyx_L1_error)
4114  __Pyx_GOTREF(__pyx_t_6);
4115  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4116  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4117  __pyx_t_3 = NULL;
4118  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4119  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
4120  if (likely(__pyx_t_3)) {
4121  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4122  __Pyx_INCREF(__pyx_t_3);
4123  __Pyx_INCREF(function);
4124  __Pyx_DECREF_SET(__pyx_t_7, function);
4125  }
4126  }
4127  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4128  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4129  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4130  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error)
4131  __Pyx_GOTREF(__pyx_t_2);
4132  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4133  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 53, __pyx_L1_error)
4134  __Pyx_GIVEREF(__pyx_t_2);
4135  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
4136  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
4137  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4138  __pyx_t_2 = 0;
4139 
4140  /* "cmeshTools.pyx":54
4141  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4142  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4143  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes) # <<<<<<<<<<<<<<
4144  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4145  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4146  */
4147  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 54, __pyx_L1_error)
4148  __Pyx_GOTREF(__pyx_t_7);
4149  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 54, __pyx_L1_error)
4150  __Pyx_GOTREF(__pyx_t_3);
4151  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4152  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryMaterialTypes;
4153  if (!__pyx_t_5) {
4154  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4155  __PYX_ERR(1, 54, __pyx_L1_error)
4156  }
4157  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4158  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global));
4159  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 54, __pyx_L1_error)
4160  __Pyx_GOTREF(__pyx_t_4);
4161  __Pyx_GOTREF(__pyx_t_7);
4162  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
4163  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 54, __pyx_L1_error)
4164  __Pyx_GOTREF(__pyx_t_6);
4165  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4166  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4167  __pyx_t_4 = NULL;
4168  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4169  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4170  if (likely(__pyx_t_4)) {
4171  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4172  __Pyx_INCREF(__pyx_t_4);
4173  __Pyx_INCREF(function);
4174  __Pyx_DECREF_SET(__pyx_t_3, function);
4175  }
4176  }
4177  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4178  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4179  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4180  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error)
4181  __Pyx_GOTREF(__pyx_t_2);
4182  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4183  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 54, __pyx_L1_error)
4184  __Pyx_GIVEREF(__pyx_t_2);
4185  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
4186  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
4187  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4188  __pyx_t_2 = 0;
4189 
4190  /* "cmeshTools.pyx":55
4191  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4192  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4193  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes) # <<<<<<<<<<<<<<
4194  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4195  * self.nx = self.mesh.nx
4196  */
4197  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 55, __pyx_L1_error)
4198  __Pyx_GOTREF(__pyx_t_3);
4199  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error)
4200  __Pyx_GOTREF(__pyx_t_4);
4201  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4202  __pyx_t_5 = __pyx_v_self->mesh.nodeMaterialTypes;
4203  if (!__pyx_t_5) {
4204  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4205  __PYX_ERR(1, 55, __pyx_L1_error)
4206  }
4207  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4208  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global));
4209  if (unlikely(!__pyx_t_7 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 55, __pyx_L1_error)
4210  __Pyx_GOTREF(__pyx_t_7);
4211  __Pyx_GOTREF(__pyx_t_3);
4212  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
4213  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 55, __pyx_L1_error)
4214  __Pyx_GOTREF(__pyx_t_6);
4215  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4216  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4217  __pyx_t_7 = NULL;
4218  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4219  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
4220  if (likely(__pyx_t_7)) {
4221  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4222  __Pyx_INCREF(__pyx_t_7);
4223  __Pyx_INCREF(function);
4224  __Pyx_DECREF_SET(__pyx_t_4, function);
4225  }
4226  }
4227  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4228  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4229  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4230  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error)
4231  __Pyx_GOTREF(__pyx_t_2);
4232  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4233  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 55, __pyx_L1_error)
4234  __Pyx_GIVEREF(__pyx_t_2);
4235  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
4236  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
4237  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4238  __pyx_t_2 = 0;
4239 
4240  /* "cmeshTools.pyx":56
4241  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4242  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4243  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray) # <<<<<<<<<<<<<<
4244  * self.nx = self.mesh.nx
4245  * self.ny = self.mesh.ny
4246  */
4247  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 56, __pyx_L1_error)
4248  __Pyx_GOTREF(__pyx_t_4);
4249  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 56, __pyx_L1_error)
4250  __Pyx_GOTREF(__pyx_t_7);
4251  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4252  __pyx_t_9 = __pyx_v_self->mesh.nodeArray;
4253  if (!__pyx_t_9) {
4254  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4255  __PYX_ERR(1, 56, __pyx_L1_error)
4256  }
4257  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4258  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global), ((Py_ssize_t)3));
4259  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 56, __pyx_L1_error)
4260  __Pyx_GOTREF(__pyx_t_3);
4261  __Pyx_GOTREF(__pyx_t_4);
4262  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
4263  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 56, __pyx_L1_error)
4264  __Pyx_GOTREF(__pyx_t_6);
4265  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4266  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4267  __pyx_t_3 = NULL;
4268  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4269  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
4270  if (likely(__pyx_t_3)) {
4271  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4272  __Pyx_INCREF(__pyx_t_3);
4273  __Pyx_INCREF(function);
4274  __Pyx_DECREF_SET(__pyx_t_7, function);
4275  }
4276  }
4277  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4278  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4279  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4280  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 56, __pyx_L1_error)
4281  __Pyx_GOTREF(__pyx_t_2);
4282  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4283  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 56, __pyx_L1_error)
4284  __Pyx_GIVEREF(__pyx_t_2);
4285  __Pyx_GOTREF(__pyx_v_self->nodeArray);
4286  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
4287  __pyx_v_self->nodeArray = ((PyArrayObject *)__pyx_t_2);
4288  __pyx_t_2 = 0;
4289 
4290  /* "cmeshTools.pyx":57
4291  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4292  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4293  * self.nx = self.mesh.nx # <<<<<<<<<<<<<<
4294  * self.ny = self.mesh.ny
4295  * self.nz = self.mesh.nz
4296  */
4297  __pyx_t_1 = __pyx_v_self->mesh.nx;
4298  __pyx_v_self->nx = __pyx_t_1;
4299 
4300  /* "cmeshTools.pyx":58
4301  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4302  * self.nx = self.mesh.nx
4303  * self.ny = self.mesh.ny # <<<<<<<<<<<<<<
4304  * self.nz = self.mesh.nz
4305  * self.px = self.mesh.px
4306  */
4307  __pyx_t_1 = __pyx_v_self->mesh.ny;
4308  __pyx_v_self->ny = __pyx_t_1;
4309 
4310  /* "cmeshTools.pyx":59
4311  * self.nx = self.mesh.nx
4312  * self.ny = self.mesh.ny
4313  * self.nz = self.mesh.nz # <<<<<<<<<<<<<<
4314  * self.px = self.mesh.px
4315  * self.py = self.mesh.py
4316  */
4317  __pyx_t_1 = __pyx_v_self->mesh.nz;
4318  __pyx_v_self->nz = __pyx_t_1;
4319 
4320  /* "cmeshTools.pyx":60
4321  * self.ny = self.mesh.ny
4322  * self.nz = self.mesh.nz
4323  * self.px = self.mesh.px # <<<<<<<<<<<<<<
4324  * self.py = self.mesh.py
4325  * self.pz = self.mesh.pz
4326  */
4327  __pyx_t_1 = __pyx_v_self->mesh.px;
4328  __pyx_v_self->px = __pyx_t_1;
4329 
4330  /* "cmeshTools.pyx":61
4331  * self.nz = self.mesh.nz
4332  * self.px = self.mesh.px
4333  * self.py = self.mesh.py # <<<<<<<<<<<<<<
4334  * self.pz = self.mesh.pz
4335  * if self.mesh.elementIJK != NULL:
4336  */
4337  __pyx_t_1 = __pyx_v_self->mesh.py;
4338  __pyx_v_self->py = __pyx_t_1;
4339 
4340  /* "cmeshTools.pyx":62
4341  * self.px = self.mesh.px
4342  * self.py = self.mesh.py
4343  * self.pz = self.mesh.pz # <<<<<<<<<<<<<<
4344  * if self.mesh.elementIJK != NULL:
4345  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4346  */
4347  __pyx_t_1 = __pyx_v_self->mesh.pz;
4348  __pyx_v_self->pz = __pyx_t_1;
4349 
4350  /* "cmeshTools.pyx":63
4351  * self.py = self.mesh.py
4352  * self.pz = self.mesh.pz
4353  * if self.mesh.elementIJK != NULL: # <<<<<<<<<<<<<<
4354  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4355  * else:
4356  */
4357  __pyx_t_8 = ((__pyx_v_self->mesh.elementIJK != NULL) != 0);
4358  if (__pyx_t_8) {
4359 
4360  /* "cmeshTools.pyx":64
4361  * self.pz = self.mesh.pz
4362  * if self.mesh.elementIJK != NULL:
4363  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK) # <<<<<<<<<<<<<<
4364  * else:
4365  * self.elementIJK = np.empty(0, dtype=np.int32)
4366  */
4367  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 64, __pyx_L1_error)
4368  __Pyx_GOTREF(__pyx_t_7);
4369  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 64, __pyx_L1_error)
4370  __Pyx_GOTREF(__pyx_t_3);
4371  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4372  __pyx_t_5 = __pyx_v_self->mesh.elementIJK;
4373  if (!__pyx_t_5) {
4374  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4375  __PYX_ERR(1, 64, __pyx_L1_error)
4376  }
4377  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4378  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nElements_global * 3)));
4379  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 64, __pyx_L1_error)
4380  __Pyx_GOTREF(__pyx_t_4);
4381  __Pyx_GOTREF(__pyx_t_7);
4382  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
4383  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 64, __pyx_L1_error)
4384  __Pyx_GOTREF(__pyx_t_6);
4385  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4386  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4387  __pyx_t_4 = NULL;
4388  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4389  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4390  if (likely(__pyx_t_4)) {
4391  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4392  __Pyx_INCREF(__pyx_t_4);
4393  __Pyx_INCREF(function);
4394  __Pyx_DECREF_SET(__pyx_t_3, function);
4395  }
4396  }
4397  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4398  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4399  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4400  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error)
4401  __Pyx_GOTREF(__pyx_t_2);
4402  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4403  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 64, __pyx_L1_error)
4404  __Pyx_GIVEREF(__pyx_t_2);
4405  __Pyx_GOTREF(__pyx_v_self->elementIJK);
4406  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
4407  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_2);
4408  __pyx_t_2 = 0;
4409 
4410  /* "cmeshTools.pyx":63
4411  * self.py = self.mesh.py
4412  * self.pz = self.mesh.pz
4413  * if self.mesh.elementIJK != NULL: # <<<<<<<<<<<<<<
4414  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4415  * else:
4416  */
4417  goto __pyx_L6;
4418  }
4419 
4420  /* "cmeshTools.pyx":66
4421  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4422  * else:
4423  * self.elementIJK = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
4424  * if self.mesh.weights != NULL:
4425  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4426  */
4427  /*else*/ {
4428  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error)
4429  __Pyx_GOTREF(__pyx_t_2);
4430  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 66, __pyx_L1_error)
4431  __Pyx_GOTREF(__pyx_t_3);
4432  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4433  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error)
4434  __Pyx_GOTREF(__pyx_t_2);
4435  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error)
4436  __Pyx_GOTREF(__pyx_t_4);
4437  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 66, __pyx_L1_error)
4438  __Pyx_GOTREF(__pyx_t_7);
4439  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4440  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(1, 66, __pyx_L1_error)
4441  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4442  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 66, __pyx_L1_error)
4443  __Pyx_GOTREF(__pyx_t_7);
4444  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4445  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4446  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 66, __pyx_L1_error)
4447  __Pyx_GIVEREF(__pyx_t_7);
4448  __Pyx_GOTREF(__pyx_v_self->elementIJK);
4449  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
4450  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_7);
4451  __pyx_t_7 = 0;
4452  }
4453  __pyx_L6:;
4454 
4455  /* "cmeshTools.pyx":67
4456  * else:
4457  * self.elementIJK = np.empty(0, dtype=np.int32)
4458  * if self.mesh.weights != NULL: # <<<<<<<<<<<<<<
4459  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4460  * else:
4461  */
4462  __pyx_t_8 = ((__pyx_v_self->mesh.weights != NULL) != 0);
4463  if (__pyx_t_8) {
4464 
4465  /* "cmeshTools.pyx":68
4466  * self.elementIJK = np.empty(0, dtype=np.int32)
4467  * if self.mesh.weights != NULL:
4468  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights) # <<<<<<<<<<<<<<
4469  * else:
4470  * self.weights = np.empty(0)
4471  */
4472  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __pyx_L1_error)
4473  __Pyx_GOTREF(__pyx_t_2);
4474  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __pyx_L1_error)
4475  __Pyx_GOTREF(__pyx_t_3);
4476  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4477  __pyx_t_9 = __pyx_v_self->mesh.weights;
4478  if (!__pyx_t_9) {
4479  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4480  __PYX_ERR(1, 68, __pyx_L1_error)
4481  }
4482  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4483  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4484  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 68, __pyx_L1_error)
4485  __Pyx_GOTREF(__pyx_t_4);
4486  __Pyx_GOTREF(__pyx_t_2);
4487  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4488  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 68, __pyx_L1_error)
4489  __Pyx_GOTREF(__pyx_t_6);
4490  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4491  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4492  __pyx_t_4 = NULL;
4493  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4494  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4495  if (likely(__pyx_t_4)) {
4496  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4497  __Pyx_INCREF(__pyx_t_4);
4498  __Pyx_INCREF(function);
4499  __Pyx_DECREF_SET(__pyx_t_3, function);
4500  }
4501  }
4502  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4503  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4504  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4505  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 68, __pyx_L1_error)
4506  __Pyx_GOTREF(__pyx_t_7);
4507  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4508  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 68, __pyx_L1_error)
4509  __Pyx_GIVEREF(__pyx_t_7);
4510  __Pyx_GOTREF(__pyx_v_self->weights);
4511  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
4512  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_7);
4513  __pyx_t_7 = 0;
4514 
4515  /* "cmeshTools.pyx":67
4516  * else:
4517  * self.elementIJK = np.empty(0, dtype=np.int32)
4518  * if self.mesh.weights != NULL: # <<<<<<<<<<<<<<
4519  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4520  * else:
4521  */
4522  goto __pyx_L7;
4523  }
4524 
4525  /* "cmeshTools.pyx":70
4526  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4527  * else:
4528  * self.weights = np.empty(0) # <<<<<<<<<<<<<<
4529  * if self.mesh.U_KNOT != NULL:
4530  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4531  */
4532  /*else*/ {
4533  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 70, __pyx_L1_error)
4534  __Pyx_GOTREF(__pyx_t_3);
4535  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 70, __pyx_L1_error)
4536  __Pyx_GOTREF(__pyx_t_4);
4537  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4538  __pyx_t_3 = NULL;
4539  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4540  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
4541  if (likely(__pyx_t_3)) {
4542  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4543  __Pyx_INCREF(__pyx_t_3);
4544  __Pyx_INCREF(function);
4545  __Pyx_DECREF_SET(__pyx_t_4, function);
4546  }
4547  }
4548  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0);
4549  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4550  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 70, __pyx_L1_error)
4551  __Pyx_GOTREF(__pyx_t_7);
4552  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4553  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 70, __pyx_L1_error)
4554  __Pyx_GIVEREF(__pyx_t_7);
4555  __Pyx_GOTREF(__pyx_v_self->weights);
4556  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
4557  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_7);
4558  __pyx_t_7 = 0;
4559  }
4560  __pyx_L7:;
4561 
4562  /* "cmeshTools.pyx":71
4563  * else:
4564  * self.weights = np.empty(0)
4565  * if self.mesh.U_KNOT != NULL: # <<<<<<<<<<<<<<
4566  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4567  * else:
4568  */
4569  __pyx_t_8 = ((__pyx_v_self->mesh.U_KNOT != NULL) != 0);
4570  if (__pyx_t_8) {
4571 
4572  /* "cmeshTools.pyx":72
4573  * self.weights = np.empty(0)
4574  * if self.mesh.U_KNOT != NULL:
4575  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT) # <<<<<<<<<<<<<<
4576  * else:
4577  * self.U_KNOT = np.empty(0)
4578  */
4579  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 72, __pyx_L1_error)
4580  __Pyx_GOTREF(__pyx_t_4);
4581  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 72, __pyx_L1_error)
4582  __Pyx_GOTREF(__pyx_t_3);
4583  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4584  __pyx_t_9 = __pyx_v_self->mesh.U_KNOT;
4585  if (!__pyx_t_9) {
4586  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4587  __PYX_ERR(1, 72, __pyx_L1_error)
4588  }
4589  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4590  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.nx + __pyx_v_self->mesh.px) + 1)));
4591  if (unlikely(!__pyx_t_2 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 72, __pyx_L1_error)
4592  __Pyx_GOTREF(__pyx_t_2);
4593  __Pyx_GOTREF(__pyx_t_4);
4594  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4595  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 72, __pyx_L1_error)
4596  __Pyx_GOTREF(__pyx_t_6);
4597  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4598  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4599  __pyx_t_2 = NULL;
4600  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4601  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4602  if (likely(__pyx_t_2)) {
4603  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4604  __Pyx_INCREF(__pyx_t_2);
4605  __Pyx_INCREF(function);
4606  __Pyx_DECREF_SET(__pyx_t_3, function);
4607  }
4608  }
4609  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4610  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4611  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4612  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 72, __pyx_L1_error)
4613  __Pyx_GOTREF(__pyx_t_7);
4614  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4615  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 72, __pyx_L1_error)
4616  __Pyx_GIVEREF(__pyx_t_7);
4617  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
4618  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
4619  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_7);
4620  __pyx_t_7 = 0;
4621 
4622  /* "cmeshTools.pyx":71
4623  * else:
4624  * self.weights = np.empty(0)
4625  * if self.mesh.U_KNOT != NULL: # <<<<<<<<<<<<<<
4626  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4627  * else:
4628  */
4629  goto __pyx_L8;
4630  }
4631 
4632  /* "cmeshTools.pyx":74
4633  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4634  * else:
4635  * self.U_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4636  * if self.mesh.V_KNOT != NULL:
4637  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4638  */
4639  /*else*/ {
4640  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 74, __pyx_L1_error)
4641  __Pyx_GOTREF(__pyx_t_3);
4642  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 74, __pyx_L1_error)
4643  __Pyx_GOTREF(__pyx_t_2);
4644  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4645  __pyx_t_3 = NULL;
4646  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4647  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4648  if (likely(__pyx_t_3)) {
4649  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4650  __Pyx_INCREF(__pyx_t_3);
4651  __Pyx_INCREF(function);
4652  __Pyx_DECREF_SET(__pyx_t_2, function);
4653  }
4654  }
4655  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
4656  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4657  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 74, __pyx_L1_error)
4658  __Pyx_GOTREF(__pyx_t_7);
4659  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4660  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 74, __pyx_L1_error)
4661  __Pyx_GIVEREF(__pyx_t_7);
4662  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
4663  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
4664  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_7);
4665  __pyx_t_7 = 0;
4666  }
4667  __pyx_L8:;
4668 
4669  /* "cmeshTools.pyx":75
4670  * else:
4671  * self.U_KNOT = np.empty(0)
4672  * if self.mesh.V_KNOT != NULL: # <<<<<<<<<<<<<<
4673  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4674  * else:
4675  */
4676  __pyx_t_8 = ((__pyx_v_self->mesh.V_KNOT != NULL) != 0);
4677  if (__pyx_t_8) {
4678 
4679  /* "cmeshTools.pyx":76
4680  * self.U_KNOT = np.empty(0)
4681  * if self.mesh.V_KNOT != NULL:
4682  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT) # <<<<<<<<<<<<<<
4683  * else:
4684  * self.V_KNOT = np.empty(0)
4685  */
4686  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 76, __pyx_L1_error)
4687  __Pyx_GOTREF(__pyx_t_2);
4688  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 76, __pyx_L1_error)
4689  __Pyx_GOTREF(__pyx_t_3);
4690  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4691  __pyx_t_9 = __pyx_v_self->mesh.V_KNOT;
4692  if (!__pyx_t_9) {
4693  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4694  __PYX_ERR(1, 76, __pyx_L1_error)
4695  }
4696  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4697  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.ny + __pyx_v_self->mesh.py) + 1)));
4698  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 76, __pyx_L1_error)
4699  __Pyx_GOTREF(__pyx_t_4);
4700  __Pyx_GOTREF(__pyx_t_2);
4701  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4702  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 76, __pyx_L1_error)
4703  __Pyx_GOTREF(__pyx_t_6);
4704  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4705  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4706  __pyx_t_4 = NULL;
4707  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4708  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4709  if (likely(__pyx_t_4)) {
4710  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4711  __Pyx_INCREF(__pyx_t_4);
4712  __Pyx_INCREF(function);
4713  __Pyx_DECREF_SET(__pyx_t_3, function);
4714  }
4715  }
4716  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4717  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4718  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4719  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 76, __pyx_L1_error)
4720  __Pyx_GOTREF(__pyx_t_7);
4721  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4722  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 76, __pyx_L1_error)
4723  __Pyx_GIVEREF(__pyx_t_7);
4724  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
4725  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
4726  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_7);
4727  __pyx_t_7 = 0;
4728 
4729  /* "cmeshTools.pyx":75
4730  * else:
4731  * self.U_KNOT = np.empty(0)
4732  * if self.mesh.V_KNOT != NULL: # <<<<<<<<<<<<<<
4733  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4734  * else:
4735  */
4736  goto __pyx_L9;
4737  }
4738 
4739  /* "cmeshTools.pyx":78
4740  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4741  * else:
4742  * self.V_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4743  * if self.mesh.W_KNOT != NULL:
4744  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4745  */
4746  /*else*/ {
4747  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 78, __pyx_L1_error)
4748  __Pyx_GOTREF(__pyx_t_3);
4749  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 78, __pyx_L1_error)
4750  __Pyx_GOTREF(__pyx_t_4);
4751  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4752  __pyx_t_3 = NULL;
4753  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4754  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
4755  if (likely(__pyx_t_3)) {
4756  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4757  __Pyx_INCREF(__pyx_t_3);
4758  __Pyx_INCREF(function);
4759  __Pyx_DECREF_SET(__pyx_t_4, function);
4760  }
4761  }
4762  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0);
4763  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4764  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 78, __pyx_L1_error)
4765  __Pyx_GOTREF(__pyx_t_7);
4766  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4767  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 78, __pyx_L1_error)
4768  __Pyx_GIVEREF(__pyx_t_7);
4769  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
4770  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
4771  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_7);
4772  __pyx_t_7 = 0;
4773  }
4774  __pyx_L9:;
4775 
4776  /* "cmeshTools.pyx":79
4777  * else:
4778  * self.V_KNOT = np.empty(0)
4779  * if self.mesh.W_KNOT != NULL: # <<<<<<<<<<<<<<
4780  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4781  * else:
4782  */
4783  __pyx_t_8 = ((__pyx_v_self->mesh.W_KNOT != NULL) != 0);
4784  if (__pyx_t_8) {
4785 
4786  /* "cmeshTools.pyx":80
4787  * self.V_KNOT = np.empty(0)
4788  * if self.mesh.W_KNOT != NULL:
4789  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT) # <<<<<<<<<<<<<<
4790  * else:
4791  * self.W_KNOT = np.empty(0)
4792  */
4793  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error)
4794  __Pyx_GOTREF(__pyx_t_4);
4795  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 80, __pyx_L1_error)
4796  __Pyx_GOTREF(__pyx_t_3);
4797  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4798  __pyx_t_9 = __pyx_v_self->mesh.W_KNOT;
4799  if (!__pyx_t_9) {
4800  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4801  __PYX_ERR(1, 80, __pyx_L1_error)
4802  }
4803  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4804  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.nz + __pyx_v_self->mesh.pz) + 1)));
4805  if (unlikely(!__pyx_t_2 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 80, __pyx_L1_error)
4806  __Pyx_GOTREF(__pyx_t_2);
4807  __Pyx_GOTREF(__pyx_t_4);
4808  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4809  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error)
4810  __Pyx_GOTREF(__pyx_t_6);
4811  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4812  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4813  __pyx_t_2 = NULL;
4814  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4815  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4816  if (likely(__pyx_t_2)) {
4817  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4818  __Pyx_INCREF(__pyx_t_2);
4819  __Pyx_INCREF(function);
4820  __Pyx_DECREF_SET(__pyx_t_3, function);
4821  }
4822  }
4823  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4824  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4825  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4826  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 80, __pyx_L1_error)
4827  __Pyx_GOTREF(__pyx_t_7);
4828  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4829  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 80, __pyx_L1_error)
4830  __Pyx_GIVEREF(__pyx_t_7);
4831  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
4832  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
4833  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_7);
4834  __pyx_t_7 = 0;
4835 
4836  /* "cmeshTools.pyx":79
4837  * else:
4838  * self.V_KNOT = np.empty(0)
4839  * if self.mesh.W_KNOT != NULL: # <<<<<<<<<<<<<<
4840  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4841  * else:
4842  */
4843  goto __pyx_L10;
4844  }
4845 
4846  /* "cmeshTools.pyx":82
4847  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4848  * else:
4849  * self.W_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4850  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
4851  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
4852  */
4853  /*else*/ {
4854  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 82, __pyx_L1_error)
4855  __Pyx_GOTREF(__pyx_t_3);
4856  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 82, __pyx_L1_error)
4857  __Pyx_GOTREF(__pyx_t_2);
4858  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4859  __pyx_t_3 = NULL;
4860  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4861  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4862  if (likely(__pyx_t_3)) {
4863  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4864  __Pyx_INCREF(__pyx_t_3);
4865  __Pyx_INCREF(function);
4866  __Pyx_DECREF_SET(__pyx_t_2, function);
4867  }
4868  }
4869  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
4870  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4871  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 82, __pyx_L1_error)
4872  __Pyx_GOTREF(__pyx_t_7);
4873  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4874  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 82, __pyx_L1_error)
4875  __Pyx_GIVEREF(__pyx_t_7);
4876  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
4877  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
4878  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_7);
4879  __pyx_t_7 = 0;
4880  }
4881  __pyx_L10:;
4882 
4883  /* "cmeshTools.pyx":83
4884  * else:
4885  * self.W_KNOT = np.empty(0)
4886  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray) # <<<<<<<<<<<<<<
4887  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
4888  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
4889  */
4890  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 83, __pyx_L1_error)
4891  __Pyx_GOTREF(__pyx_t_2);
4892  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 83, __pyx_L1_error)
4893  __Pyx_GOTREF(__pyx_t_3);
4894  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4895  __pyx_t_9 = __pyx_v_self->mesh.elementDiametersArray;
4896  if (!__pyx_t_9) {
4897  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4898  __PYX_ERR(1, 83, __pyx_L1_error)
4899  }
4900  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4901  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4902  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 83, __pyx_L1_error)
4903  __Pyx_GOTREF(__pyx_t_4);
4904  __Pyx_GOTREF(__pyx_t_2);
4905  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4906  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 83, __pyx_L1_error)
4907  __Pyx_GOTREF(__pyx_t_6);
4908  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4909  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4910  __pyx_t_4 = NULL;
4911  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4912  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4913  if (likely(__pyx_t_4)) {
4914  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4915  __Pyx_INCREF(__pyx_t_4);
4916  __Pyx_INCREF(function);
4917  __Pyx_DECREF_SET(__pyx_t_3, function);
4918  }
4919  }
4920  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4921  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4922  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4923  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 83, __pyx_L1_error)
4924  __Pyx_GOTREF(__pyx_t_7);
4925  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4926  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 83, __pyx_L1_error)
4927  __Pyx_GIVEREF(__pyx_t_7);
4928  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
4929  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
4930  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)__pyx_t_7);
4931  __pyx_t_7 = 0;
4932 
4933  /* "cmeshTools.pyx":84
4934  * self.W_KNOT = np.empty(0)
4935  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
4936  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray) # <<<<<<<<<<<<<<
4937  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
4938  * if self.mesh.elementBarycentersArray:
4939  */
4940  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error)
4941  __Pyx_GOTREF(__pyx_t_3);
4942  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 84, __pyx_L1_error)
4943  __Pyx_GOTREF(__pyx_t_4);
4944  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4945  __pyx_t_9 = __pyx_v_self->mesh.elementInnerDiametersArray;
4946  if (!__pyx_t_9) {
4947  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4948  __PYX_ERR(1, 84, __pyx_L1_error)
4949  }
4950  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4951  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4952  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 84, __pyx_L1_error)
4953  __Pyx_GOTREF(__pyx_t_2);
4954  __Pyx_GOTREF(__pyx_t_3);
4955  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4956  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 84, __pyx_L1_error)
4957  __Pyx_GOTREF(__pyx_t_6);
4958  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4959  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4960  __pyx_t_2 = NULL;
4961  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4962  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
4963  if (likely(__pyx_t_2)) {
4964  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4965  __Pyx_INCREF(__pyx_t_2);
4966  __Pyx_INCREF(function);
4967  __Pyx_DECREF_SET(__pyx_t_4, function);
4968  }
4969  }
4970  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4971  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4972  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4973  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
4974  __Pyx_GOTREF(__pyx_t_7);
4975  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4976  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 84, __pyx_L1_error)
4977  __Pyx_GIVEREF(__pyx_t_7);
4978  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
4979  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
4980  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)__pyx_t_7);
4981  __pyx_t_7 = 0;
4982 
4983  /* "cmeshTools.pyx":85
4984  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
4985  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
4986  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray) # <<<<<<<<<<<<<<
4987  * if self.mesh.elementBarycentersArray:
4988  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
4989  */
4990  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 85, __pyx_L1_error)
4991  __Pyx_GOTREF(__pyx_t_4);
4992  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 85, __pyx_L1_error)
4993  __Pyx_GOTREF(__pyx_t_2);
4994  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4995  __pyx_t_9 = __pyx_v_self->mesh.elementBoundaryDiametersArray;
4996  if (!__pyx_t_9) {
4997  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4998  __PYX_ERR(1, 85, __pyx_L1_error)
4999  }
5000  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5001  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global));
5002  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 85, __pyx_L1_error)
5003  __Pyx_GOTREF(__pyx_t_3);
5004  __Pyx_GOTREF(__pyx_t_4);
5005  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
5006  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 85, __pyx_L1_error)
5007  __Pyx_GOTREF(__pyx_t_6);
5008  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5009  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5010  __pyx_t_3 = NULL;
5011  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5012  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5013  if (likely(__pyx_t_3)) {
5014  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5015  __Pyx_INCREF(__pyx_t_3);
5016  __Pyx_INCREF(function);
5017  __Pyx_DECREF_SET(__pyx_t_2, function);
5018  }
5019  }
5020  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
5021  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5022  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5023  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 85, __pyx_L1_error)
5024  __Pyx_GOTREF(__pyx_t_7);
5025  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5026  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 85, __pyx_L1_error)
5027  __Pyx_GIVEREF(__pyx_t_7);
5028  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
5029  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
5030  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)__pyx_t_7);
5031  __pyx_t_7 = 0;
5032 
5033  /* "cmeshTools.pyx":86
5034  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5035  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5036  * if self.mesh.elementBarycentersArray: # <<<<<<<<<<<<<<
5037  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5038  * if self.mesh.elementBoundaryBarycentersArray:
5039  */
5040  __pyx_t_8 = (__pyx_v_self->mesh.elementBarycentersArray != 0);
5041  if (__pyx_t_8) {
5042 
5043  /* "cmeshTools.pyx":87
5044  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5045  * if self.mesh.elementBarycentersArray:
5046  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray) # <<<<<<<<<<<<<<
5047  * if self.mesh.elementBoundaryBarycentersArray:
5048  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5049  */
5050  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 87, __pyx_L1_error)
5051  __Pyx_GOTREF(__pyx_t_2);
5052  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 87, __pyx_L1_error)
5053  __Pyx_GOTREF(__pyx_t_3);
5054  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5055  __pyx_t_9 = __pyx_v_self->mesh.elementBarycentersArray;
5056  if (!__pyx_t_9) {
5057  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5058  __PYX_ERR(1, 87, __pyx_L1_error)
5059  }
5060  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5061  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)3));
5062  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 87, __pyx_L1_error)
5063  __Pyx_GOTREF(__pyx_t_4);
5064  __Pyx_GOTREF(__pyx_t_2);
5065  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
5066  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 87, __pyx_L1_error)
5067  __Pyx_GOTREF(__pyx_t_6);
5068  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5069  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5070  __pyx_t_4 = NULL;
5071  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5072  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5073  if (likely(__pyx_t_4)) {
5074  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5075  __Pyx_INCREF(__pyx_t_4);
5076  __Pyx_INCREF(function);
5077  __Pyx_DECREF_SET(__pyx_t_3, function);
5078  }
5079  }
5080  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
5081  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5082  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5083  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 87, __pyx_L1_error)
5084  __Pyx_GOTREF(__pyx_t_7);
5085  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5086  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 87, __pyx_L1_error)
5087  __Pyx_GIVEREF(__pyx_t_7);
5088  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
5089  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
5090  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)__pyx_t_7);
5091  __pyx_t_7 = 0;
5092 
5093  /* "cmeshTools.pyx":86
5094  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5095  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5096  * if self.mesh.elementBarycentersArray: # <<<<<<<<<<<<<<
5097  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5098  * if self.mesh.elementBoundaryBarycentersArray:
5099  */
5100  }
5101 
5102  /* "cmeshTools.pyx":88
5103  * if self.mesh.elementBarycentersArray:
5104  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5105  * if self.mesh.elementBoundaryBarycentersArray: # <<<<<<<<<<<<<<
5106  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5107  * if self.mesh.nodeDiametersArray:
5108  */
5109  __pyx_t_8 = (__pyx_v_self->mesh.elementBoundaryBarycentersArray != 0);
5110  if (__pyx_t_8) {
5111 
5112  /* "cmeshTools.pyx":89
5113  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5114  * if self.mesh.elementBoundaryBarycentersArray:
5115  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray) # <<<<<<<<<<<<<<
5116  * if self.mesh.nodeDiametersArray:
5117  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5118  */
5119  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 89, __pyx_L1_error)
5120  __Pyx_GOTREF(__pyx_t_3);
5121  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 89, __pyx_L1_error)
5122  __Pyx_GOTREF(__pyx_t_4);
5123  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5124  __pyx_t_9 = __pyx_v_self->mesh.elementBoundaryBarycentersArray;
5125  if (!__pyx_t_9) {
5126  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5127  __PYX_ERR(1, 89, __pyx_L1_error)
5128  }
5129  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5130  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)3));
5131  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 89, __pyx_L1_error)
5132  __Pyx_GOTREF(__pyx_t_2);
5133  __Pyx_GOTREF(__pyx_t_3);
5134  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
5135  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 89, __pyx_L1_error)
5136  __Pyx_GOTREF(__pyx_t_6);
5137  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5138  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5139  __pyx_t_2 = NULL;
5140  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5141  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
5142  if (likely(__pyx_t_2)) {
5143  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5144  __Pyx_INCREF(__pyx_t_2);
5145  __Pyx_INCREF(function);
5146  __Pyx_DECREF_SET(__pyx_t_4, function);
5147  }
5148  }
5149  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
5150  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5151  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5152  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 89, __pyx_L1_error)
5153  __Pyx_GOTREF(__pyx_t_7);
5154  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5155  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 89, __pyx_L1_error)
5156  __Pyx_GIVEREF(__pyx_t_7);
5157  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
5158  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
5159  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)__pyx_t_7);
5160  __pyx_t_7 = 0;
5161 
5162  /* "cmeshTools.pyx":88
5163  * if self.mesh.elementBarycentersArray:
5164  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5165  * if self.mesh.elementBoundaryBarycentersArray: # <<<<<<<<<<<<<<
5166  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5167  * if self.mesh.nodeDiametersArray:
5168  */
5169  }
5170 
5171  /* "cmeshTools.pyx":90
5172  * if self.mesh.elementBoundaryBarycentersArray:
5173  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5174  * if self.mesh.nodeDiametersArray: # <<<<<<<<<<<<<<
5175  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5176  * if self.mesh.nodeSupportArray:
5177  */
5178  __pyx_t_8 = (__pyx_v_self->mesh.nodeDiametersArray != 0);
5179  if (__pyx_t_8) {
5180 
5181  /* "cmeshTools.pyx":91
5182  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5183  * if self.mesh.nodeDiametersArray:
5184  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray) # <<<<<<<<<<<<<<
5185  * if self.mesh.nodeSupportArray:
5186  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5187  */
5188  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 91, __pyx_L1_error)
5189  __Pyx_GOTREF(__pyx_t_4);
5190  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 91, __pyx_L1_error)
5191  __Pyx_GOTREF(__pyx_t_2);
5192  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5193  __pyx_t_9 = __pyx_v_self->mesh.nodeDiametersArray;
5194  if (!__pyx_t_9) {
5195  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5196  __PYX_ERR(1, 91, __pyx_L1_error)
5197  }
5198  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5199  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global));
5200  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 91, __pyx_L1_error)
5201  __Pyx_GOTREF(__pyx_t_3);
5202  __Pyx_GOTREF(__pyx_t_4);
5203  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
5204  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 91, __pyx_L1_error)
5205  __Pyx_GOTREF(__pyx_t_6);
5206  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5207  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5208  __pyx_t_3 = NULL;
5209  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5210  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5211  if (likely(__pyx_t_3)) {
5212  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5213  __Pyx_INCREF(__pyx_t_3);
5214  __Pyx_INCREF(function);
5215  __Pyx_DECREF_SET(__pyx_t_2, function);
5216  }
5217  }
5218  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
5219  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5220  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5221  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 91, __pyx_L1_error)
5222  __Pyx_GOTREF(__pyx_t_7);
5223  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5224  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 91, __pyx_L1_error)
5225  __Pyx_GIVEREF(__pyx_t_7);
5226  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
5227  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
5228  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)__pyx_t_7);
5229  __pyx_t_7 = 0;
5230 
5231  /* "cmeshTools.pyx":90
5232  * if self.mesh.elementBoundaryBarycentersArray:
5233  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5234  * if self.mesh.nodeDiametersArray: # <<<<<<<<<<<<<<
5235  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5236  * if self.mesh.nodeSupportArray:
5237  */
5238  }
5239 
5240  /* "cmeshTools.pyx":92
5241  * if self.mesh.nodeDiametersArray:
5242  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5243  * if self.mesh.nodeSupportArray: # <<<<<<<<<<<<<<
5244  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5245  * self.h = self.mesh.h
5246  */
5247  __pyx_t_8 = (__pyx_v_self->mesh.nodeSupportArray != 0);
5248  if (__pyx_t_8) {
5249 
5250  /* "cmeshTools.pyx":93
5251  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5252  * if self.mesh.nodeSupportArray:
5253  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray) # <<<<<<<<<<<<<<
5254  * self.h = self.mesh.h
5255  * self.hMin = self.mesh.hMin
5256  */
5257  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 93, __pyx_L1_error)
5258  __Pyx_GOTREF(__pyx_t_2);
5259  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 93, __pyx_L1_error)
5260  __Pyx_GOTREF(__pyx_t_3);
5261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5262  __pyx_t_9 = __pyx_v_self->mesh.nodeSupportArray;
5263  if (!__pyx_t_9) {
5264  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5265  __PYX_ERR(1, 93, __pyx_L1_error)
5266  }
5267  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5268  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global));
5269  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 93, __pyx_L1_error)
5270  __Pyx_GOTREF(__pyx_t_4);
5271  __Pyx_GOTREF(__pyx_t_2);
5272  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
5273  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 93, __pyx_L1_error)
5274  __Pyx_GOTREF(__pyx_t_6);
5275  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5276  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5277  __pyx_t_4 = NULL;
5278  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5279  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5280  if (likely(__pyx_t_4)) {
5281  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5282  __Pyx_INCREF(__pyx_t_4);
5283  __Pyx_INCREF(function);
5284  __Pyx_DECREF_SET(__pyx_t_3, function);
5285  }
5286  }
5287  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
5288  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5289  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5290  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)
5291  __Pyx_GOTREF(__pyx_t_7);
5292  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5293  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 93, __pyx_L1_error)
5294  __Pyx_GIVEREF(__pyx_t_7);
5295  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
5296  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
5297  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)__pyx_t_7);
5298  __pyx_t_7 = 0;
5299 
5300  /* "cmeshTools.pyx":92
5301  * if self.mesh.nodeDiametersArray:
5302  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5303  * if self.mesh.nodeSupportArray: # <<<<<<<<<<<<<<
5304  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5305  * self.h = self.mesh.h
5306  */
5307  }
5308 
5309  /* "cmeshTools.pyx":94
5310  * if self.mesh.nodeSupportArray:
5311  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5312  * self.h = self.mesh.h # <<<<<<<<<<<<<<
5313  * self.hMin = self.mesh.hMin
5314  * self.sigmaMax = self.mesh.sigmaMax
5315  */
5316  __pyx_t_10 = __pyx_v_self->mesh.h;
5317  __pyx_v_self->h = __pyx_t_10;
5318 
5319  /* "cmeshTools.pyx":95
5320  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5321  * self.h = self.mesh.h
5322  * self.hMin = self.mesh.hMin # <<<<<<<<<<<<<<
5323  * self.sigmaMax = self.mesh.sigmaMax
5324  * self.volume = self.mesh.volume
5325  */
5326  __pyx_t_10 = __pyx_v_self->mesh.hMin;
5327  __pyx_v_self->hMin = __pyx_t_10;
5328 
5329  /* "cmeshTools.pyx":96
5330  * self.h = self.mesh.h
5331  * self.hMin = self.mesh.hMin
5332  * self.sigmaMax = self.mesh.sigmaMax # <<<<<<<<<<<<<<
5333  * self.volume = self.mesh.volume
5334  *
5335  */
5336  __pyx_t_10 = __pyx_v_self->mesh.sigmaMax;
5337  __pyx_v_self->sigmaMax = __pyx_t_10;
5338 
5339  /* "cmeshTools.pyx":97
5340  * self.hMin = self.mesh.hMin
5341  * self.sigmaMax = self.mesh.sigmaMax
5342  * self.volume = self.mesh.volume # <<<<<<<<<<<<<<
5343  *
5344  * def buildPythonMeshInterfaceNoArrays(self):
5345  */
5346  __pyx_t_10 = __pyx_v_self->mesh.volume;
5347  __pyx_v_self->volume = __pyx_t_10;
5348 
5349  /* "cmeshTools.pyx":16
5350  * cppm.initializeMesh(self.mesh)
5351  *
5352  * def buildPythonMeshInterface(self): # <<<<<<<<<<<<<<
5353  * cdef int dim1
5354  * self.nElements_global = self.mesh.nElements_global
5355  */
5356 
5357  /* function exit code */
5358  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5359  goto __pyx_L0;
5360  __pyx_L1_error:;
5361  __Pyx_XDECREF(__pyx_t_2);
5362  __Pyx_XDECREF(__pyx_t_3);
5363  __Pyx_XDECREF(__pyx_t_4);
5364  __Pyx_XDECREF(((PyObject *)__pyx_t_6));
5365  __Pyx_XDECREF(__pyx_t_7);
5366  __Pyx_AddTraceback("cmeshTools.CMesh.buildPythonMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
5367  __pyx_r = NULL;
5368  __pyx_L0:;
5369  __Pyx_XGIVEREF(__pyx_r);
5370  __Pyx_RefNannyFinishContext();
5371  return __pyx_r;
5372 }
5373 
5374 /* "cmeshTools.pyx":99
5375  * self.volume = self.mesh.volume
5376  *
5377  * def buildPythonMeshInterfaceNoArrays(self): # <<<<<<<<<<<<<<
5378  * cdef int dim1
5379  * self.nElements_global = self.mesh.nElements_global
5380  */
5381 
5382 /* Python wrapper */
5383 static PyObject *__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterfaceNoArrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5384 static PyObject *__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterfaceNoArrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5385  PyObject *__pyx_r = 0;
5386  __Pyx_RefNannyDeclarations
5387  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays (wrapper)", 0);
5388  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterfaceNoArrays(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5389 
5390  /* function exit code */
5391  __Pyx_RefNannyFinishContext();
5392  return __pyx_r;
5393 }
5394 
5395 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterfaceNoArrays(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5396  PyObject *__pyx_r = NULL;
5397  __Pyx_RefNannyDeclarations
5398  int __pyx_t_1;
5399  double __pyx_t_2;
5400  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays", 0);
5401 
5402  /* "cmeshTools.pyx":101
5403  * def buildPythonMeshInterfaceNoArrays(self):
5404  * cdef int dim1
5405  * self.nElements_global = self.mesh.nElements_global # <<<<<<<<<<<<<<
5406  * self.nNodes_global = self.mesh.nNodes_global
5407  * self.nNodes_element = self.mesh.nNodes_element
5408  */
5409  __pyx_t_1 = __pyx_v_self->mesh.nElements_global;
5410  __pyx_v_self->nElements_global = __pyx_t_1;
5411 
5412  /* "cmeshTools.pyx":102
5413  * cdef int dim1
5414  * self.nElements_global = self.mesh.nElements_global
5415  * self.nNodes_global = self.mesh.nNodes_global # <<<<<<<<<<<<<<
5416  * self.nNodes_element = self.mesh.nNodes_element
5417  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5418  */
5419  __pyx_t_1 = __pyx_v_self->mesh.nNodes_global;
5420  __pyx_v_self->nNodes_global = __pyx_t_1;
5421 
5422  /* "cmeshTools.pyx":103
5423  * self.nElements_global = self.mesh.nElements_global
5424  * self.nNodes_global = self.mesh.nNodes_global
5425  * self.nNodes_element = self.mesh.nNodes_element # <<<<<<<<<<<<<<
5426  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5427  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5428  */
5429  __pyx_t_1 = __pyx_v_self->mesh.nNodes_element;
5430  __pyx_v_self->nNodes_element = __pyx_t_1;
5431 
5432  /* "cmeshTools.pyx":104
5433  * self.nNodes_global = self.mesh.nNodes_global
5434  * self.nNodes_element = self.mesh.nNodes_element
5435  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
5436  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5437  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5438  */
5439  __pyx_t_1 = __pyx_v_self->mesh.nNodes_elementBoundary;
5440  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
5441 
5442  /* "cmeshTools.pyx":105
5443  * self.nNodes_element = self.mesh.nNodes_element
5444  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5445  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element # <<<<<<<<<<<<<<
5446  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5447  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5448  */
5449  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_element;
5450  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
5451 
5452  /* "cmeshTools.pyx":106
5453  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5454  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5455  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
5456  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5457  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5458  */
5459  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_global;
5460  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
5461 
5462  /* "cmeshTools.pyx":107
5463  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5464  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5465  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global # <<<<<<<<<<<<<<
5466  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5467  * self.max_nElements_node = self.mesh.max_nElements_node
5468  */
5469  __pyx_t_1 = __pyx_v_self->mesh.nInteriorElementBoundaries_global;
5470  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
5471 
5472  /* "cmeshTools.pyx":108
5473  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5474  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5475  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global # <<<<<<<<<<<<<<
5476  * self.max_nElements_node = self.mesh.max_nElements_node
5477  * self.nEdges_global = self.mesh.nEdges_global
5478  */
5479  __pyx_t_1 = __pyx_v_self->mesh.nExteriorElementBoundaries_global;
5480  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
5481 
5482  /* "cmeshTools.pyx":109
5483  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5484  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5485  * self.max_nElements_node = self.mesh.max_nElements_node # <<<<<<<<<<<<<<
5486  * self.nEdges_global = self.mesh.nEdges_global
5487  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5488  */
5489  __pyx_t_1 = __pyx_v_self->mesh.max_nElements_node;
5490  __pyx_v_self->max_nElements_node = __pyx_t_1;
5491 
5492  /* "cmeshTools.pyx":110
5493  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5494  * self.max_nElements_node = self.mesh.max_nElements_node
5495  * self.nEdges_global = self.mesh.nEdges_global # <<<<<<<<<<<<<<
5496  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5497  * self.h = self.mesh.h
5498  */
5499  __pyx_t_1 = __pyx_v_self->mesh.nEdges_global;
5500  __pyx_v_self->nEdges_global = __pyx_t_1;
5501 
5502  /* "cmeshTools.pyx":111
5503  * self.max_nElements_node = self.mesh.max_nElements_node
5504  * self.nEdges_global = self.mesh.nEdges_global
5505  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node # <<<<<<<<<<<<<<
5506  * self.h = self.mesh.h
5507  * self.hMin = self.mesh.hMin
5508  */
5509  __pyx_t_1 = __pyx_v_self->mesh.max_nNodeNeighbors_node;
5510  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
5511 
5512  /* "cmeshTools.pyx":112
5513  * self.nEdges_global = self.mesh.nEdges_global
5514  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5515  * self.h = self.mesh.h # <<<<<<<<<<<<<<
5516  * self.hMin = self.mesh.hMin
5517  * self.sigmaMax = self.mesh.sigmaMax
5518  */
5519  __pyx_t_2 = __pyx_v_self->mesh.h;
5520  __pyx_v_self->h = __pyx_t_2;
5521 
5522  /* "cmeshTools.pyx":113
5523  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5524  * self.h = self.mesh.h
5525  * self.hMin = self.mesh.hMin # <<<<<<<<<<<<<<
5526  * self.sigmaMax = self.mesh.sigmaMax
5527  * self.volume = self.mesh.volume
5528  */
5529  __pyx_t_2 = __pyx_v_self->mesh.hMin;
5530  __pyx_v_self->hMin = __pyx_t_2;
5531 
5532  /* "cmeshTools.pyx":114
5533  * self.h = self.mesh.h
5534  * self.hMin = self.mesh.hMin
5535  * self.sigmaMax = self.mesh.sigmaMax # <<<<<<<<<<<<<<
5536  * self.volume = self.mesh.volume
5537  *
5538  */
5539  __pyx_t_2 = __pyx_v_self->mesh.sigmaMax;
5540  __pyx_v_self->sigmaMax = __pyx_t_2;
5541 
5542  /* "cmeshTools.pyx":115
5543  * self.hMin = self.mesh.hMin
5544  * self.sigmaMax = self.mesh.sigmaMax
5545  * self.volume = self.mesh.volume # <<<<<<<<<<<<<<
5546  *
5547  * def buildPythonMeshInterface(cmesh):
5548  */
5549  __pyx_t_2 = __pyx_v_self->mesh.volume;
5550  __pyx_v_self->volume = __pyx_t_2;
5551 
5552  /* "cmeshTools.pyx":99
5553  * self.volume = self.mesh.volume
5554  *
5555  * def buildPythonMeshInterfaceNoArrays(self): # <<<<<<<<<<<<<<
5556  * cdef int dim1
5557  * self.nElements_global = self.mesh.nElements_global
5558  */
5559 
5560  /* function exit code */
5561  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5562  __Pyx_XGIVEREF(__pyx_r);
5563  __Pyx_RefNannyFinishContext();
5564  return __pyx_r;
5565 }
5566 
5567 /* "cmeshTools.pxd":8
5568  * cdef cppm.Mesh mesh
5569  * cdef public:
5570  * cdef int nElements_global # <<<<<<<<<<<<<<
5571  * cdef int nNodes_global
5572  * cdef int nNodes_element
5573  */
5574 
5575 /* Python wrapper */
5576 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5577 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(PyObject *__pyx_v_self) {
5578  PyObject *__pyx_r = 0;
5579  __Pyx_RefNannyDeclarations
5580  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5581  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5582 
5583  /* function exit code */
5584  __Pyx_RefNannyFinishContext();
5585  return __pyx_r;
5586 }
5587 
5588 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5589  PyObject *__pyx_r = NULL;
5590  __Pyx_RefNannyDeclarations
5591  PyObject *__pyx_t_1 = NULL;
5592  __Pyx_RefNannySetupContext("__get__", 0);
5593  __Pyx_XDECREF(__pyx_r);
5594  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
5595  __Pyx_GOTREF(__pyx_t_1);
5596  __pyx_r = __pyx_t_1;
5597  __pyx_t_1 = 0;
5598  goto __pyx_L0;
5599 
5600  /* function exit code */
5601  __pyx_L1_error:;
5602  __Pyx_XDECREF(__pyx_t_1);
5603  __Pyx_AddTraceback("cmeshTools.CMesh.nElements_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5604  __pyx_r = NULL;
5605  __pyx_L0:;
5606  __Pyx_XGIVEREF(__pyx_r);
5607  __Pyx_RefNannyFinishContext();
5608  return __pyx_r;
5609 }
5610 
5611 /* Python wrapper */
5612 static int __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5613 static int __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5614  int __pyx_r;
5615  __Pyx_RefNannyDeclarations
5616  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5617  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5618 
5619  /* function exit code */
5620  __Pyx_RefNannyFinishContext();
5621  return __pyx_r;
5622 }
5623 
5624 static int __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5625  int __pyx_r;
5626  __Pyx_RefNannyDeclarations
5627  int __pyx_t_1;
5628  __Pyx_RefNannySetupContext("__set__", 0);
5629  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 8, __pyx_L1_error)
5630  __pyx_v_self->nElements_global = __pyx_t_1;
5631 
5632  /* function exit code */
5633  __pyx_r = 0;
5634  goto __pyx_L0;
5635  __pyx_L1_error:;
5636  __Pyx_AddTraceback("cmeshTools.CMesh.nElements_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5637  __pyx_r = -1;
5638  __pyx_L0:;
5639  __Pyx_RefNannyFinishContext();
5640  return __pyx_r;
5641 }
5642 
5643 /* "cmeshTools.pxd":9
5644  * cdef public:
5645  * cdef int nElements_global
5646  * cdef int nNodes_global # <<<<<<<<<<<<<<
5647  * cdef int nNodes_element
5648  * cdef int nNodes_elementBoundary
5649  */
5650 
5651 /* Python wrapper */
5652 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5653 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(PyObject *__pyx_v_self) {
5654  PyObject *__pyx_r = 0;
5655  __Pyx_RefNannyDeclarations
5656  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5657  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5658 
5659  /* function exit code */
5660  __Pyx_RefNannyFinishContext();
5661  return __pyx_r;
5662 }
5663 
5664 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5665  PyObject *__pyx_r = NULL;
5666  __Pyx_RefNannyDeclarations
5667  PyObject *__pyx_t_1 = NULL;
5668  __Pyx_RefNannySetupContext("__get__", 0);
5669  __Pyx_XDECREF(__pyx_r);
5670  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
5671  __Pyx_GOTREF(__pyx_t_1);
5672  __pyx_r = __pyx_t_1;
5673  __pyx_t_1 = 0;
5674  goto __pyx_L0;
5675 
5676  /* function exit code */
5677  __pyx_L1_error:;
5678  __Pyx_XDECREF(__pyx_t_1);
5679  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5680  __pyx_r = NULL;
5681  __pyx_L0:;
5682  __Pyx_XGIVEREF(__pyx_r);
5683  __Pyx_RefNannyFinishContext();
5684  return __pyx_r;
5685 }
5686 
5687 /* Python wrapper */
5688 static int __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5689 static int __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5690  int __pyx_r;
5691  __Pyx_RefNannyDeclarations
5692  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5693  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5694 
5695  /* function exit code */
5696  __Pyx_RefNannyFinishContext();
5697  return __pyx_r;
5698 }
5699 
5700 static int __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5701  int __pyx_r;
5702  __Pyx_RefNannyDeclarations
5703  int __pyx_t_1;
5704  __Pyx_RefNannySetupContext("__set__", 0);
5705  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 9, __pyx_L1_error)
5706  __pyx_v_self->nNodes_global = __pyx_t_1;
5707 
5708  /* function exit code */
5709  __pyx_r = 0;
5710  goto __pyx_L0;
5711  __pyx_L1_error:;
5712  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5713  __pyx_r = -1;
5714  __pyx_L0:;
5715  __Pyx_RefNannyFinishContext();
5716  return __pyx_r;
5717 }
5718 
5719 /* "cmeshTools.pxd":10
5720  * cdef int nElements_global
5721  * cdef int nNodes_global
5722  * cdef int nNodes_element # <<<<<<<<<<<<<<
5723  * cdef int nNodes_elementBoundary
5724  * cdef int nElementBoundaries_element,
5725  */
5726 
5727 /* Python wrapper */
5728 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(PyObject *__pyx_v_self); /*proto*/
5729 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(PyObject *__pyx_v_self) {
5730  PyObject *__pyx_r = 0;
5731  __Pyx_RefNannyDeclarations
5732  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5733  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5734 
5735  /* function exit code */
5736  __Pyx_RefNannyFinishContext();
5737  return __pyx_r;
5738 }
5739 
5740 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5741  PyObject *__pyx_r = NULL;
5742  __Pyx_RefNannyDeclarations
5743  PyObject *__pyx_t_1 = NULL;
5744  __Pyx_RefNannySetupContext("__get__", 0);
5745  __Pyx_XDECREF(__pyx_r);
5746  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
5747  __Pyx_GOTREF(__pyx_t_1);
5748  __pyx_r = __pyx_t_1;
5749  __pyx_t_1 = 0;
5750  goto __pyx_L0;
5751 
5752  /* function exit code */
5753  __pyx_L1_error:;
5754  __Pyx_XDECREF(__pyx_t_1);
5755  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_element.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5756  __pyx_r = NULL;
5757  __pyx_L0:;
5758  __Pyx_XGIVEREF(__pyx_r);
5759  __Pyx_RefNannyFinishContext();
5760  return __pyx_r;
5761 }
5762 
5763 /* Python wrapper */
5764 static int __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5765 static int __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5766  int __pyx_r;
5767  __Pyx_RefNannyDeclarations
5768  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5769  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5770 
5771  /* function exit code */
5772  __Pyx_RefNannyFinishContext();
5773  return __pyx_r;
5774 }
5775 
5776 static int __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5777  int __pyx_r;
5778  __Pyx_RefNannyDeclarations
5779  int __pyx_t_1;
5780  __Pyx_RefNannySetupContext("__set__", 0);
5781  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
5782  __pyx_v_self->nNodes_element = __pyx_t_1;
5783 
5784  /* function exit code */
5785  __pyx_r = 0;
5786  goto __pyx_L0;
5787  __pyx_L1_error:;
5788  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_element.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5789  __pyx_r = -1;
5790  __pyx_L0:;
5791  __Pyx_RefNannyFinishContext();
5792  return __pyx_r;
5793 }
5794 
5795 /* "cmeshTools.pxd":11
5796  * cdef int nNodes_global
5797  * cdef int nNodes_element
5798  * cdef int nNodes_elementBoundary # <<<<<<<<<<<<<<
5799  * cdef int nElementBoundaries_element,
5800  * cdef int nElementBoundaries_global,
5801  */
5802 
5803 /* Python wrapper */
5804 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(PyObject *__pyx_v_self); /*proto*/
5805 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(PyObject *__pyx_v_self) {
5806  PyObject *__pyx_r = 0;
5807  __Pyx_RefNannyDeclarations
5808  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5809  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5810 
5811  /* function exit code */
5812  __Pyx_RefNannyFinishContext();
5813  return __pyx_r;
5814 }
5815 
5816 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5817  PyObject *__pyx_r = NULL;
5818  __Pyx_RefNannyDeclarations
5819  PyObject *__pyx_t_1 = NULL;
5820  __Pyx_RefNannySetupContext("__get__", 0);
5821  __Pyx_XDECREF(__pyx_r);
5822  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_elementBoundary); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
5823  __Pyx_GOTREF(__pyx_t_1);
5824  __pyx_r = __pyx_t_1;
5825  __pyx_t_1 = 0;
5826  goto __pyx_L0;
5827 
5828  /* function exit code */
5829  __pyx_L1_error:;
5830  __Pyx_XDECREF(__pyx_t_1);
5831  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_elementBoundary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5832  __pyx_r = NULL;
5833  __pyx_L0:;
5834  __Pyx_XGIVEREF(__pyx_r);
5835  __Pyx_RefNannyFinishContext();
5836  return __pyx_r;
5837 }
5838 
5839 /* Python wrapper */
5840 static int __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5841 static int __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5842  int __pyx_r;
5843  __Pyx_RefNannyDeclarations
5844  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5845  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5846 
5847  /* function exit code */
5848  __Pyx_RefNannyFinishContext();
5849  return __pyx_r;
5850 }
5851 
5852 static int __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5853  int __pyx_r;
5854  __Pyx_RefNannyDeclarations
5855  int __pyx_t_1;
5856  __Pyx_RefNannySetupContext("__set__", 0);
5857  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 11, __pyx_L1_error)
5858  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
5859 
5860  /* function exit code */
5861  __pyx_r = 0;
5862  goto __pyx_L0;
5863  __pyx_L1_error:;
5864  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_elementBoundary.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5865  __pyx_r = -1;
5866  __pyx_L0:;
5867  __Pyx_RefNannyFinishContext();
5868  return __pyx_r;
5869 }
5870 
5871 /* "cmeshTools.pxd":12
5872  * cdef int nNodes_element
5873  * cdef int nNodes_elementBoundary
5874  * cdef int nElementBoundaries_element, # <<<<<<<<<<<<<<
5875  * cdef int nElementBoundaries_global,
5876  * cdef int nInteriorElementBoundaries_global,
5877  */
5878 
5879 /* Python wrapper */
5880 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(PyObject *__pyx_v_self); /*proto*/
5881 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(PyObject *__pyx_v_self) {
5882  PyObject *__pyx_r = 0;
5883  __Pyx_RefNannyDeclarations
5884  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5885  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5886 
5887  /* function exit code */
5888  __Pyx_RefNannyFinishContext();
5889  return __pyx_r;
5890 }
5891 
5892 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5893  PyObject *__pyx_r = NULL;
5894  __Pyx_RefNannyDeclarations
5895  PyObject *__pyx_t_1 = NULL;
5896  __Pyx_RefNannySetupContext("__get__", 0);
5897  __Pyx_XDECREF(__pyx_r);
5898  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElementBoundaries_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
5899  __Pyx_GOTREF(__pyx_t_1);
5900  __pyx_r = __pyx_t_1;
5901  __pyx_t_1 = 0;
5902  goto __pyx_L0;
5903 
5904  /* function exit code */
5905  __pyx_L1_error:;
5906  __Pyx_XDECREF(__pyx_t_1);
5907  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_element.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5908  __pyx_r = NULL;
5909  __pyx_L0:;
5910  __Pyx_XGIVEREF(__pyx_r);
5911  __Pyx_RefNannyFinishContext();
5912  return __pyx_r;
5913 }
5914 
5915 /* Python wrapper */
5916 static int __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5917 static int __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5918  int __pyx_r;
5919  __Pyx_RefNannyDeclarations
5920  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5921  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5922 
5923  /* function exit code */
5924  __Pyx_RefNannyFinishContext();
5925  return __pyx_r;
5926 }
5927 
5928 static int __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5929  int __pyx_r;
5930  __Pyx_RefNannyDeclarations
5931  int __pyx_t_1;
5932  __Pyx_RefNannySetupContext("__set__", 0);
5933  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
5934  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
5935 
5936  /* function exit code */
5937  __pyx_r = 0;
5938  goto __pyx_L0;
5939  __pyx_L1_error:;
5940  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_element.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5941  __pyx_r = -1;
5942  __pyx_L0:;
5943  __Pyx_RefNannyFinishContext();
5944  return __pyx_r;
5945 }
5946 
5947 /* "cmeshTools.pxd":13
5948  * cdef int nNodes_elementBoundary
5949  * cdef int nElementBoundaries_element,
5950  * cdef int nElementBoundaries_global, # <<<<<<<<<<<<<<
5951  * cdef int nInteriorElementBoundaries_global,
5952  * cdef int nExteriorElementBoundaries_global,
5953  */
5954 
5955 /* Python wrapper */
5956 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5957 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
5958  PyObject *__pyx_r = 0;
5959  __Pyx_RefNannyDeclarations
5960  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5961  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5962 
5963  /* function exit code */
5964  __Pyx_RefNannyFinishContext();
5965  return __pyx_r;
5966 }
5967 
5968 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5969  PyObject *__pyx_r = NULL;
5970  __Pyx_RefNannyDeclarations
5971  PyObject *__pyx_t_1 = NULL;
5972  __Pyx_RefNannySetupContext("__get__", 0);
5973  __Pyx_XDECREF(__pyx_r);
5974  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
5975  __Pyx_GOTREF(__pyx_t_1);
5976  __pyx_r = __pyx_t_1;
5977  __pyx_t_1 = 0;
5978  goto __pyx_L0;
5979 
5980  /* function exit code */
5981  __pyx_L1_error:;
5982  __Pyx_XDECREF(__pyx_t_1);
5983  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5984  __pyx_r = NULL;
5985  __pyx_L0:;
5986  __Pyx_XGIVEREF(__pyx_r);
5987  __Pyx_RefNannyFinishContext();
5988  return __pyx_r;
5989 }
5990 
5991 /* Python wrapper */
5992 static int __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5993 static int __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5994  int __pyx_r;
5995  __Pyx_RefNannyDeclarations
5996  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5997  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5998 
5999  /* function exit code */
6000  __Pyx_RefNannyFinishContext();
6001  return __pyx_r;
6002 }
6003 
6004 static int __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6005  int __pyx_r;
6006  __Pyx_RefNannyDeclarations
6007  int __pyx_t_1;
6008  __Pyx_RefNannySetupContext("__set__", 0);
6009  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 13, __pyx_L1_error)
6010  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
6011 
6012  /* function exit code */
6013  __pyx_r = 0;
6014  goto __pyx_L0;
6015  __pyx_L1_error:;
6016  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6017  __pyx_r = -1;
6018  __pyx_L0:;
6019  __Pyx_RefNannyFinishContext();
6020  return __pyx_r;
6021 }
6022 
6023 /* "cmeshTools.pxd":14
6024  * cdef int nElementBoundaries_element,
6025  * cdef int nElementBoundaries_global,
6026  * cdef int nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6027  * cdef int nExteriorElementBoundaries_global,
6028  * cdef int max_nElements_node,
6029  */
6030 
6031 /* Python wrapper */
6032 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6033 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
6034  PyObject *__pyx_r = 0;
6035  __Pyx_RefNannyDeclarations
6036  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6037  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6038 
6039  /* function exit code */
6040  __Pyx_RefNannyFinishContext();
6041  return __pyx_r;
6042 }
6043 
6044 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6045  PyObject *__pyx_r = NULL;
6046  __Pyx_RefNannyDeclarations
6047  PyObject *__pyx_t_1 = NULL;
6048  __Pyx_RefNannySetupContext("__get__", 0);
6049  __Pyx_XDECREF(__pyx_r);
6050  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nInteriorElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
6051  __Pyx_GOTREF(__pyx_t_1);
6052  __pyx_r = __pyx_t_1;
6053  __pyx_t_1 = 0;
6054  goto __pyx_L0;
6055 
6056  /* function exit code */
6057  __pyx_L1_error:;
6058  __Pyx_XDECREF(__pyx_t_1);
6059  __Pyx_AddTraceback("cmeshTools.CMesh.nInteriorElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6060  __pyx_r = NULL;
6061  __pyx_L0:;
6062  __Pyx_XGIVEREF(__pyx_r);
6063  __Pyx_RefNannyFinishContext();
6064  return __pyx_r;
6065 }
6066 
6067 /* Python wrapper */
6068 static int __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6069 static int __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6070  int __pyx_r;
6071  __Pyx_RefNannyDeclarations
6072  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6073  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6074 
6075  /* function exit code */
6076  __Pyx_RefNannyFinishContext();
6077  return __pyx_r;
6078 }
6079 
6080 static int __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6081  int __pyx_r;
6082  __Pyx_RefNannyDeclarations
6083  int __pyx_t_1;
6084  __Pyx_RefNannySetupContext("__set__", 0);
6085  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 14, __pyx_L1_error)
6086  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
6087 
6088  /* function exit code */
6089  __pyx_r = 0;
6090  goto __pyx_L0;
6091  __pyx_L1_error:;
6092  __Pyx_AddTraceback("cmeshTools.CMesh.nInteriorElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6093  __pyx_r = -1;
6094  __pyx_L0:;
6095  __Pyx_RefNannyFinishContext();
6096  return __pyx_r;
6097 }
6098 
6099 /* "cmeshTools.pxd":15
6100  * cdef int nElementBoundaries_global,
6101  * cdef int nInteriorElementBoundaries_global,
6102  * cdef int nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6103  * cdef int max_nElements_node,
6104  * cdef int nEdges_global,
6105  */
6106 
6107 /* Python wrapper */
6108 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6109 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
6110  PyObject *__pyx_r = 0;
6111  __Pyx_RefNannyDeclarations
6112  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6113  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6114 
6115  /* function exit code */
6116  __Pyx_RefNannyFinishContext();
6117  return __pyx_r;
6118 }
6119 
6120 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6121  PyObject *__pyx_r = NULL;
6122  __Pyx_RefNannyDeclarations
6123  PyObject *__pyx_t_1 = NULL;
6124  __Pyx_RefNannySetupContext("__get__", 0);
6125  __Pyx_XDECREF(__pyx_r);
6126  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nExteriorElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
6127  __Pyx_GOTREF(__pyx_t_1);
6128  __pyx_r = __pyx_t_1;
6129  __pyx_t_1 = 0;
6130  goto __pyx_L0;
6131 
6132  /* function exit code */
6133  __pyx_L1_error:;
6134  __Pyx_XDECREF(__pyx_t_1);
6135  __Pyx_AddTraceback("cmeshTools.CMesh.nExteriorElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6136  __pyx_r = NULL;
6137  __pyx_L0:;
6138  __Pyx_XGIVEREF(__pyx_r);
6139  __Pyx_RefNannyFinishContext();
6140  return __pyx_r;
6141 }
6142 
6143 /* Python wrapper */
6144 static int __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6145 static int __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6146  int __pyx_r;
6147  __Pyx_RefNannyDeclarations
6148  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6149  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6150 
6151  /* function exit code */
6152  __Pyx_RefNannyFinishContext();
6153  return __pyx_r;
6154 }
6155 
6156 static int __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6157  int __pyx_r;
6158  __Pyx_RefNannyDeclarations
6159  int __pyx_t_1;
6160  __Pyx_RefNannySetupContext("__set__", 0);
6161  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 15, __pyx_L1_error)
6162  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
6163 
6164  /* function exit code */
6165  __pyx_r = 0;
6166  goto __pyx_L0;
6167  __pyx_L1_error:;
6168  __Pyx_AddTraceback("cmeshTools.CMesh.nExteriorElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6169  __pyx_r = -1;
6170  __pyx_L0:;
6171  __Pyx_RefNannyFinishContext();
6172  return __pyx_r;
6173 }
6174 
6175 /* "cmeshTools.pxd":16
6176  * cdef int nInteriorElementBoundaries_global,
6177  * cdef int nExteriorElementBoundaries_global,
6178  * cdef int max_nElements_node, # <<<<<<<<<<<<<<
6179  * cdef int nEdges_global,
6180  * cdef int max_nNodeNeighbors_node,
6181  */
6182 
6183 /* Python wrapper */
6184 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(PyObject *__pyx_v_self); /*proto*/
6185 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(PyObject *__pyx_v_self) {
6186  PyObject *__pyx_r = 0;
6187  __Pyx_RefNannyDeclarations
6188  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6189  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6190 
6191  /* function exit code */
6192  __Pyx_RefNannyFinishContext();
6193  return __pyx_r;
6194 }
6195 
6196 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6197  PyObject *__pyx_r = NULL;
6198  __Pyx_RefNannyDeclarations
6199  PyObject *__pyx_t_1 = NULL;
6200  __Pyx_RefNannySetupContext("__get__", 0);
6201  __Pyx_XDECREF(__pyx_r);
6202  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_nElements_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 16, __pyx_L1_error)
6203  __Pyx_GOTREF(__pyx_t_1);
6204  __pyx_r = __pyx_t_1;
6205  __pyx_t_1 = 0;
6206  goto __pyx_L0;
6207 
6208  /* function exit code */
6209  __pyx_L1_error:;
6210  __Pyx_XDECREF(__pyx_t_1);
6211  __Pyx_AddTraceback("cmeshTools.CMesh.max_nElements_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6212  __pyx_r = NULL;
6213  __pyx_L0:;
6214  __Pyx_XGIVEREF(__pyx_r);
6215  __Pyx_RefNannyFinishContext();
6216  return __pyx_r;
6217 }
6218 
6219 /* Python wrapper */
6220 static int __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6221 static int __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6222  int __pyx_r;
6223  __Pyx_RefNannyDeclarations
6224  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6225  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6226 
6227  /* function exit code */
6228  __Pyx_RefNannyFinishContext();
6229  return __pyx_r;
6230 }
6231 
6232 static int __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6233  int __pyx_r;
6234  __Pyx_RefNannyDeclarations
6235  int __pyx_t_1;
6236  __Pyx_RefNannySetupContext("__set__", 0);
6237  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L1_error)
6238  __pyx_v_self->max_nElements_node = __pyx_t_1;
6239 
6240  /* function exit code */
6241  __pyx_r = 0;
6242  goto __pyx_L0;
6243  __pyx_L1_error:;
6244  __Pyx_AddTraceback("cmeshTools.CMesh.max_nElements_node.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6245  __pyx_r = -1;
6246  __pyx_L0:;
6247  __Pyx_RefNannyFinishContext();
6248  return __pyx_r;
6249 }
6250 
6251 /* "cmeshTools.pxd":17
6252  * cdef int nExteriorElementBoundaries_global,
6253  * cdef int max_nElements_node,
6254  * cdef int nEdges_global, # <<<<<<<<<<<<<<
6255  * cdef int max_nNodeNeighbors_node,
6256  * # cdef int[:,:] elementNodesArray,
6257  */
6258 
6259 /* Python wrapper */
6260 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6261 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(PyObject *__pyx_v_self) {
6262  PyObject *__pyx_r = 0;
6263  __Pyx_RefNannyDeclarations
6264  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6265  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6266 
6267  /* function exit code */
6268  __Pyx_RefNannyFinishContext();
6269  return __pyx_r;
6270 }
6271 
6272 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6273  PyObject *__pyx_r = NULL;
6274  __Pyx_RefNannyDeclarations
6275  PyObject *__pyx_t_1 = NULL;
6276  __Pyx_RefNannySetupContext("__get__", 0);
6277  __Pyx_XDECREF(__pyx_r);
6278  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nEdges_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
6279  __Pyx_GOTREF(__pyx_t_1);
6280  __pyx_r = __pyx_t_1;
6281  __pyx_t_1 = 0;
6282  goto __pyx_L0;
6283 
6284  /* function exit code */
6285  __pyx_L1_error:;
6286  __Pyx_XDECREF(__pyx_t_1);
6287  __Pyx_AddTraceback("cmeshTools.CMesh.nEdges_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6288  __pyx_r = NULL;
6289  __pyx_L0:;
6290  __Pyx_XGIVEREF(__pyx_r);
6291  __Pyx_RefNannyFinishContext();
6292  return __pyx_r;
6293 }
6294 
6295 /* Python wrapper */
6296 static int __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6297 static int __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6298  int __pyx_r;
6299  __Pyx_RefNannyDeclarations
6300  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6301  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6302 
6303  /* function exit code */
6304  __Pyx_RefNannyFinishContext();
6305  return __pyx_r;
6306 }
6307 
6308 static int __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6309  int __pyx_r;
6310  __Pyx_RefNannyDeclarations
6311  int __pyx_t_1;
6312  __Pyx_RefNannySetupContext("__set__", 0);
6313  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 17, __pyx_L1_error)
6314  __pyx_v_self->nEdges_global = __pyx_t_1;
6315 
6316  /* function exit code */
6317  __pyx_r = 0;
6318  goto __pyx_L0;
6319  __pyx_L1_error:;
6320  __Pyx_AddTraceback("cmeshTools.CMesh.nEdges_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6321  __pyx_r = -1;
6322  __pyx_L0:;
6323  __Pyx_RefNannyFinishContext();
6324  return __pyx_r;
6325 }
6326 
6327 /* "cmeshTools.pxd":18
6328  * cdef int max_nElements_node,
6329  * cdef int nEdges_global,
6330  * cdef int max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
6331  * # cdef int[:,:] elementNodesArray,
6332  * # cdef int[:] nodeElementsArray,
6333  */
6334 
6335 /* Python wrapper */
6336 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(PyObject *__pyx_v_self); /*proto*/
6337 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(PyObject *__pyx_v_self) {
6338  PyObject *__pyx_r = 0;
6339  __Pyx_RefNannyDeclarations
6340  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6341  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6342 
6343  /* function exit code */
6344  __Pyx_RefNannyFinishContext();
6345  return __pyx_r;
6346 }
6347 
6348 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6349  PyObject *__pyx_r = NULL;
6350  __Pyx_RefNannyDeclarations
6351  PyObject *__pyx_t_1 = NULL;
6352  __Pyx_RefNannySetupContext("__get__", 0);
6353  __Pyx_XDECREF(__pyx_r);
6354  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_nNodeNeighbors_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 18, __pyx_L1_error)
6355  __Pyx_GOTREF(__pyx_t_1);
6356  __pyx_r = __pyx_t_1;
6357  __pyx_t_1 = 0;
6358  goto __pyx_L0;
6359 
6360  /* function exit code */
6361  __pyx_L1_error:;
6362  __Pyx_XDECREF(__pyx_t_1);
6363  __Pyx_AddTraceback("cmeshTools.CMesh.max_nNodeNeighbors_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6364  __pyx_r = NULL;
6365  __pyx_L0:;
6366  __Pyx_XGIVEREF(__pyx_r);
6367  __Pyx_RefNannyFinishContext();
6368  return __pyx_r;
6369 }
6370 
6371 /* Python wrapper */
6372 static int __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6373 static int __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6374  int __pyx_r;
6375  __Pyx_RefNannyDeclarations
6376  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6377  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6378 
6379  /* function exit code */
6380  __Pyx_RefNannyFinishContext();
6381  return __pyx_r;
6382 }
6383 
6384 static int __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6385  int __pyx_r;
6386  __Pyx_RefNannyDeclarations
6387  int __pyx_t_1;
6388  __Pyx_RefNannySetupContext("__set__", 0);
6389  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 18, __pyx_L1_error)
6390  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
6391 
6392  /* function exit code */
6393  __pyx_r = 0;
6394  goto __pyx_L0;
6395  __pyx_L1_error:;
6396  __Pyx_AddTraceback("cmeshTools.CMesh.max_nNodeNeighbors_node.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6397  __pyx_r = -1;
6398  __pyx_L0:;
6399  __Pyx_RefNannyFinishContext();
6400  return __pyx_r;
6401 }
6402 
6403 /* "cmeshTools.pxd":37
6404  * # cdef double[:,:] nodeArray,
6405  *
6406  * cdef np.ndarray elementNodesArray, # <<<<<<<<<<<<<<
6407  * cdef np.ndarray nodeElementsArray,
6408  * cdef np.ndarray nodeElementOffsets,
6409  */
6410 
6411 /* Python wrapper */
6412 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6413 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(PyObject *__pyx_v_self) {
6414  PyObject *__pyx_r = 0;
6415  __Pyx_RefNannyDeclarations
6416  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6417  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6418 
6419  /* function exit code */
6420  __Pyx_RefNannyFinishContext();
6421  return __pyx_r;
6422 }
6423 
6424 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6425  PyObject *__pyx_r = NULL;
6426  __Pyx_RefNannyDeclarations
6427  __Pyx_RefNannySetupContext("__get__", 0);
6428  __Pyx_XDECREF(__pyx_r);
6429  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementNodesArray));
6430  __pyx_r = ((PyObject *)__pyx_v_self->elementNodesArray);
6431  goto __pyx_L0;
6432 
6433  /* function exit code */
6434  __pyx_L0:;
6435  __Pyx_XGIVEREF(__pyx_r);
6436  __Pyx_RefNannyFinishContext();
6437  return __pyx_r;
6438 }
6439 
6440 /* Python wrapper */
6441 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6442 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6443  int __pyx_r;
6444  __Pyx_RefNannyDeclarations
6445  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6446  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6447 
6448  /* function exit code */
6449  __Pyx_RefNannyFinishContext();
6450  return __pyx_r;
6451 }
6452 
6453 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6454  int __pyx_r;
6455  __Pyx_RefNannyDeclarations
6456  PyObject *__pyx_t_1 = NULL;
6457  __Pyx_RefNannySetupContext("__set__", 0);
6458  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 37, __pyx_L1_error)
6459  __pyx_t_1 = __pyx_v_value;
6460  __Pyx_INCREF(__pyx_t_1);
6461  __Pyx_GIVEREF(__pyx_t_1);
6462  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
6463  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
6464  __pyx_v_self->elementNodesArray = ((PyArrayObject *)__pyx_t_1);
6465  __pyx_t_1 = 0;
6466 
6467  /* function exit code */
6468  __pyx_r = 0;
6469  goto __pyx_L0;
6470  __pyx_L1_error:;
6471  __Pyx_XDECREF(__pyx_t_1);
6472  __Pyx_AddTraceback("cmeshTools.CMesh.elementNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6473  __pyx_r = -1;
6474  __pyx_L0:;
6475  __Pyx_RefNannyFinishContext();
6476  return __pyx_r;
6477 }
6478 
6479 /* Python wrapper */
6480 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6481 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(PyObject *__pyx_v_self) {
6482  int __pyx_r;
6483  __Pyx_RefNannyDeclarations
6484  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6485  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6486 
6487  /* function exit code */
6488  __Pyx_RefNannyFinishContext();
6489  return __pyx_r;
6490 }
6491 
6492 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6493  int __pyx_r;
6494  __Pyx_RefNannyDeclarations
6495  __Pyx_RefNannySetupContext("__del__", 0);
6496  __Pyx_INCREF(Py_None);
6497  __Pyx_GIVEREF(Py_None);
6498  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
6499  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
6500  __pyx_v_self->elementNodesArray = ((PyArrayObject *)Py_None);
6501 
6502  /* function exit code */
6503  __pyx_r = 0;
6504  __Pyx_RefNannyFinishContext();
6505  return __pyx_r;
6506 }
6507 
6508 /* "cmeshTools.pxd":38
6509  *
6510  * cdef np.ndarray elementNodesArray,
6511  * cdef np.ndarray nodeElementsArray, # <<<<<<<<<<<<<<
6512  * cdef np.ndarray nodeElementOffsets,
6513  * cdef np.ndarray elementNeighborsArray,
6514  */
6515 
6516 /* Python wrapper */
6517 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6518 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(PyObject *__pyx_v_self) {
6519  PyObject *__pyx_r = 0;
6520  __Pyx_RefNannyDeclarations
6521  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6522  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6523 
6524  /* function exit code */
6525  __Pyx_RefNannyFinishContext();
6526  return __pyx_r;
6527 }
6528 
6529 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6530  PyObject *__pyx_r = NULL;
6531  __Pyx_RefNannyDeclarations
6532  __Pyx_RefNannySetupContext("__get__", 0);
6533  __Pyx_XDECREF(__pyx_r);
6534  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6535  __pyx_r = ((PyObject *)__pyx_v_self->nodeElementsArray);
6536  goto __pyx_L0;
6537 
6538  /* function exit code */
6539  __pyx_L0:;
6540  __Pyx_XGIVEREF(__pyx_r);
6541  __Pyx_RefNannyFinishContext();
6542  return __pyx_r;
6543 }
6544 
6545 /* Python wrapper */
6546 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6547 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6548  int __pyx_r;
6549  __Pyx_RefNannyDeclarations
6550  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6551  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6552 
6553  /* function exit code */
6554  __Pyx_RefNannyFinishContext();
6555  return __pyx_r;
6556 }
6557 
6558 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6559  int __pyx_r;
6560  __Pyx_RefNannyDeclarations
6561  PyObject *__pyx_t_1 = NULL;
6562  __Pyx_RefNannySetupContext("__set__", 0);
6563  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 38, __pyx_L1_error)
6564  __pyx_t_1 = __pyx_v_value;
6565  __Pyx_INCREF(__pyx_t_1);
6566  __Pyx_GIVEREF(__pyx_t_1);
6567  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
6568  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6569  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_1);
6570  __pyx_t_1 = 0;
6571 
6572  /* function exit code */
6573  __pyx_r = 0;
6574  goto __pyx_L0;
6575  __pyx_L1_error:;
6576  __Pyx_XDECREF(__pyx_t_1);
6577  __Pyx_AddTraceback("cmeshTools.CMesh.nodeElementsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6578  __pyx_r = -1;
6579  __pyx_L0:;
6580  __Pyx_RefNannyFinishContext();
6581  return __pyx_r;
6582 }
6583 
6584 /* Python wrapper */
6585 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6586 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(PyObject *__pyx_v_self) {
6587  int __pyx_r;
6588  __Pyx_RefNannyDeclarations
6589  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6590  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6591 
6592  /* function exit code */
6593  __Pyx_RefNannyFinishContext();
6594  return __pyx_r;
6595 }
6596 
6597 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6598  int __pyx_r;
6599  __Pyx_RefNannyDeclarations
6600  __Pyx_RefNannySetupContext("__del__", 0);
6601  __Pyx_INCREF(Py_None);
6602  __Pyx_GIVEREF(Py_None);
6603  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
6604  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6605  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)Py_None);
6606 
6607  /* function exit code */
6608  __pyx_r = 0;
6609  __Pyx_RefNannyFinishContext();
6610  return __pyx_r;
6611 }
6612 
6613 /* "cmeshTools.pxd":39
6614  * cdef np.ndarray elementNodesArray,
6615  * cdef np.ndarray nodeElementsArray,
6616  * cdef np.ndarray nodeElementOffsets, # <<<<<<<<<<<<<<
6617  * cdef np.ndarray elementNeighborsArray,
6618  * cdef np.ndarray elementBoundariesArray,
6619  */
6620 
6621 /* Python wrapper */
6622 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
6623 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(PyObject *__pyx_v_self) {
6624  PyObject *__pyx_r = 0;
6625  __Pyx_RefNannyDeclarations
6626  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6627  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6628 
6629  /* function exit code */
6630  __Pyx_RefNannyFinishContext();
6631  return __pyx_r;
6632 }
6633 
6634 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6635  PyObject *__pyx_r = NULL;
6636  __Pyx_RefNannyDeclarations
6637  __Pyx_RefNannySetupContext("__get__", 0);
6638  __Pyx_XDECREF(__pyx_r);
6639  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6640  __pyx_r = ((PyObject *)__pyx_v_self->nodeElementOffsets);
6641  goto __pyx_L0;
6642 
6643  /* function exit code */
6644  __pyx_L0:;
6645  __Pyx_XGIVEREF(__pyx_r);
6646  __Pyx_RefNannyFinishContext();
6647  return __pyx_r;
6648 }
6649 
6650 /* Python wrapper */
6651 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6652 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6653  int __pyx_r;
6654  __Pyx_RefNannyDeclarations
6655  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6656  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6657 
6658  /* function exit code */
6659  __Pyx_RefNannyFinishContext();
6660  return __pyx_r;
6661 }
6662 
6663 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6664  int __pyx_r;
6665  __Pyx_RefNannyDeclarations
6666  PyObject *__pyx_t_1 = NULL;
6667  __Pyx_RefNannySetupContext("__set__", 0);
6668  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 39, __pyx_L1_error)
6669  __pyx_t_1 = __pyx_v_value;
6670  __Pyx_INCREF(__pyx_t_1);
6671  __Pyx_GIVEREF(__pyx_t_1);
6672  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
6673  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6674  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_1);
6675  __pyx_t_1 = 0;
6676 
6677  /* function exit code */
6678  __pyx_r = 0;
6679  goto __pyx_L0;
6680  __pyx_L1_error:;
6681  __Pyx_XDECREF(__pyx_t_1);
6682  __Pyx_AddTraceback("cmeshTools.CMesh.nodeElementOffsets.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6683  __pyx_r = -1;
6684  __pyx_L0:;
6685  __Pyx_RefNannyFinishContext();
6686  return __pyx_r;
6687 }
6688 
6689 /* Python wrapper */
6690 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(PyObject *__pyx_v_self); /*proto*/
6691 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(PyObject *__pyx_v_self) {
6692  int __pyx_r;
6693  __Pyx_RefNannyDeclarations
6694  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6695  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6696 
6697  /* function exit code */
6698  __Pyx_RefNannyFinishContext();
6699  return __pyx_r;
6700 }
6701 
6702 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6703  int __pyx_r;
6704  __Pyx_RefNannyDeclarations
6705  __Pyx_RefNannySetupContext("__del__", 0);
6706  __Pyx_INCREF(Py_None);
6707  __Pyx_GIVEREF(Py_None);
6708  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
6709  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6710  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)Py_None);
6711 
6712  /* function exit code */
6713  __pyx_r = 0;
6714  __Pyx_RefNannyFinishContext();
6715  return __pyx_r;
6716 }
6717 
6718 /* "cmeshTools.pxd":40
6719  * cdef np.ndarray nodeElementsArray,
6720  * cdef np.ndarray nodeElementOffsets,
6721  * cdef np.ndarray elementNeighborsArray, # <<<<<<<<<<<<<<
6722  * cdef np.ndarray elementBoundariesArray,
6723  * cdef np.ndarray elementBoundaryNodesArray,
6724  */
6725 
6726 /* Python wrapper */
6727 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6728 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(PyObject *__pyx_v_self) {
6729  PyObject *__pyx_r = 0;
6730  __Pyx_RefNannyDeclarations
6731  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6732  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6733 
6734  /* function exit code */
6735  __Pyx_RefNannyFinishContext();
6736  return __pyx_r;
6737 }
6738 
6739 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6740  PyObject *__pyx_r = NULL;
6741  __Pyx_RefNannyDeclarations
6742  __Pyx_RefNannySetupContext("__get__", 0);
6743  __Pyx_XDECREF(__pyx_r);
6744  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6745  __pyx_r = ((PyObject *)__pyx_v_self->elementNeighborsArray);
6746  goto __pyx_L0;
6747 
6748  /* function exit code */
6749  __pyx_L0:;
6750  __Pyx_XGIVEREF(__pyx_r);
6751  __Pyx_RefNannyFinishContext();
6752  return __pyx_r;
6753 }
6754 
6755 /* Python wrapper */
6756 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6757 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6758  int __pyx_r;
6759  __Pyx_RefNannyDeclarations
6760  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6761  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6762 
6763  /* function exit code */
6764  __Pyx_RefNannyFinishContext();
6765  return __pyx_r;
6766 }
6767 
6768 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6769  int __pyx_r;
6770  __Pyx_RefNannyDeclarations
6771  PyObject *__pyx_t_1 = NULL;
6772  __Pyx_RefNannySetupContext("__set__", 0);
6773  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 40, __pyx_L1_error)
6774  __pyx_t_1 = __pyx_v_value;
6775  __Pyx_INCREF(__pyx_t_1);
6776  __Pyx_GIVEREF(__pyx_t_1);
6777  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
6778  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6779  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)__pyx_t_1);
6780  __pyx_t_1 = 0;
6781 
6782  /* function exit code */
6783  __pyx_r = 0;
6784  goto __pyx_L0;
6785  __pyx_L1_error:;
6786  __Pyx_XDECREF(__pyx_t_1);
6787  __Pyx_AddTraceback("cmeshTools.CMesh.elementNeighborsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6788  __pyx_r = -1;
6789  __pyx_L0:;
6790  __Pyx_RefNannyFinishContext();
6791  return __pyx_r;
6792 }
6793 
6794 /* Python wrapper */
6795 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6796 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(PyObject *__pyx_v_self) {
6797  int __pyx_r;
6798  __Pyx_RefNannyDeclarations
6799  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6800  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6801 
6802  /* function exit code */
6803  __Pyx_RefNannyFinishContext();
6804  return __pyx_r;
6805 }
6806 
6807 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6808  int __pyx_r;
6809  __Pyx_RefNannyDeclarations
6810  __Pyx_RefNannySetupContext("__del__", 0);
6811  __Pyx_INCREF(Py_None);
6812  __Pyx_GIVEREF(Py_None);
6813  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
6814  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6815  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)Py_None);
6816 
6817  /* function exit code */
6818  __pyx_r = 0;
6819  __Pyx_RefNannyFinishContext();
6820  return __pyx_r;
6821 }
6822 
6823 /* "cmeshTools.pxd":41
6824  * cdef np.ndarray nodeElementOffsets,
6825  * cdef np.ndarray elementNeighborsArray,
6826  * cdef np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
6827  * cdef np.ndarray elementBoundaryNodesArray,
6828  * cdef np.ndarray elementBoundaryElementsArray,
6829  */
6830 
6831 /* Python wrapper */
6832 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6833 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
6834  PyObject *__pyx_r = 0;
6835  __Pyx_RefNannyDeclarations
6836  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6837  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6838 
6839  /* function exit code */
6840  __Pyx_RefNannyFinishContext();
6841  return __pyx_r;
6842 }
6843 
6844 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6845  PyObject *__pyx_r = NULL;
6846  __Pyx_RefNannyDeclarations
6847  __Pyx_RefNannySetupContext("__get__", 0);
6848  __Pyx_XDECREF(__pyx_r);
6849  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
6850  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundariesArray);
6851  goto __pyx_L0;
6852 
6853  /* function exit code */
6854  __pyx_L0:;
6855  __Pyx_XGIVEREF(__pyx_r);
6856  __Pyx_RefNannyFinishContext();
6857  return __pyx_r;
6858 }
6859 
6860 /* Python wrapper */
6861 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6862 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6863  int __pyx_r;
6864  __Pyx_RefNannyDeclarations
6865  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6866  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6867 
6868  /* function exit code */
6869  __Pyx_RefNannyFinishContext();
6870  return __pyx_r;
6871 }
6872 
6873 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6874  int __pyx_r;
6875  __Pyx_RefNannyDeclarations
6876  PyObject *__pyx_t_1 = NULL;
6877  __Pyx_RefNannySetupContext("__set__", 0);
6878  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 41, __pyx_L1_error)
6879  __pyx_t_1 = __pyx_v_value;
6880  __Pyx_INCREF(__pyx_t_1);
6881  __Pyx_GIVEREF(__pyx_t_1);
6882  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
6883  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
6884  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
6885  __pyx_t_1 = 0;
6886 
6887  /* function exit code */
6888  __pyx_r = 0;
6889  goto __pyx_L0;
6890  __pyx_L1_error:;
6891  __Pyx_XDECREF(__pyx_t_1);
6892  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6893  __pyx_r = -1;
6894  __pyx_L0:;
6895  __Pyx_RefNannyFinishContext();
6896  return __pyx_r;
6897 }
6898 
6899 /* Python wrapper */
6900 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6901 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
6902  int __pyx_r;
6903  __Pyx_RefNannyDeclarations
6904  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6905  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6906 
6907  /* function exit code */
6908  __Pyx_RefNannyFinishContext();
6909  return __pyx_r;
6910 }
6911 
6912 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6913  int __pyx_r;
6914  __Pyx_RefNannyDeclarations
6915  __Pyx_RefNannySetupContext("__del__", 0);
6916  __Pyx_INCREF(Py_None);
6917  __Pyx_GIVEREF(Py_None);
6918  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
6919  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
6920  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)Py_None);
6921 
6922  /* function exit code */
6923  __pyx_r = 0;
6924  __Pyx_RefNannyFinishContext();
6925  return __pyx_r;
6926 }
6927 
6928 /* "cmeshTools.pxd":42
6929  * cdef np.ndarray elementNeighborsArray,
6930  * cdef np.ndarray elementBoundariesArray,
6931  * cdef np.ndarray elementBoundaryNodesArray, # <<<<<<<<<<<<<<
6932  * cdef np.ndarray elementBoundaryElementsArray,
6933  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
6934  */
6935 
6936 /* Python wrapper */
6937 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6938 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(PyObject *__pyx_v_self) {
6939  PyObject *__pyx_r = 0;
6940  __Pyx_RefNannyDeclarations
6941  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6942  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6943 
6944  /* function exit code */
6945  __Pyx_RefNannyFinishContext();
6946  return __pyx_r;
6947 }
6948 
6949 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6950  PyObject *__pyx_r = NULL;
6951  __Pyx_RefNannyDeclarations
6952  __Pyx_RefNannySetupContext("__get__", 0);
6953  __Pyx_XDECREF(__pyx_r);
6954  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
6955  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryNodesArray);
6956  goto __pyx_L0;
6957 
6958  /* function exit code */
6959  __pyx_L0:;
6960  __Pyx_XGIVEREF(__pyx_r);
6961  __Pyx_RefNannyFinishContext();
6962  return __pyx_r;
6963 }
6964 
6965 /* Python wrapper */
6966 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6967 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6968  int __pyx_r;
6969  __Pyx_RefNannyDeclarations
6970  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6971  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6972 
6973  /* function exit code */
6974  __Pyx_RefNannyFinishContext();
6975  return __pyx_r;
6976 }
6977 
6978 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6979  int __pyx_r;
6980  __Pyx_RefNannyDeclarations
6981  PyObject *__pyx_t_1 = NULL;
6982  __Pyx_RefNannySetupContext("__set__", 0);
6983  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 42, __pyx_L1_error)
6984  __pyx_t_1 = __pyx_v_value;
6985  __Pyx_INCREF(__pyx_t_1);
6986  __Pyx_GIVEREF(__pyx_t_1);
6987  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
6988  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
6989  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)__pyx_t_1);
6990  __pyx_t_1 = 0;
6991 
6992  /* function exit code */
6993  __pyx_r = 0;
6994  goto __pyx_L0;
6995  __pyx_L1_error:;
6996  __Pyx_XDECREF(__pyx_t_1);
6997  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6998  __pyx_r = -1;
6999  __pyx_L0:;
7000  __Pyx_RefNannyFinishContext();
7001  return __pyx_r;
7002 }
7003 
7004 /* Python wrapper */
7005 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7006 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(PyObject *__pyx_v_self) {
7007  int __pyx_r;
7008  __Pyx_RefNannyDeclarations
7009  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7010  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7011 
7012  /* function exit code */
7013  __Pyx_RefNannyFinishContext();
7014  return __pyx_r;
7015 }
7016 
7017 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7018  int __pyx_r;
7019  __Pyx_RefNannyDeclarations
7020  __Pyx_RefNannySetupContext("__del__", 0);
7021  __Pyx_INCREF(Py_None);
7022  __Pyx_GIVEREF(Py_None);
7023  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
7024  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
7025  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)Py_None);
7026 
7027  /* function exit code */
7028  __pyx_r = 0;
7029  __Pyx_RefNannyFinishContext();
7030  return __pyx_r;
7031 }
7032 
7033 /* "cmeshTools.pxd":43
7034  * cdef np.ndarray elementBoundariesArray,
7035  * cdef np.ndarray elementBoundaryNodesArray,
7036  * cdef np.ndarray elementBoundaryElementsArray, # <<<<<<<<<<<<<<
7037  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7038  * cdef np.ndarray interiorElementBoundariesArray,
7039  */
7040 
7041 /* Python wrapper */
7042 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7043 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(PyObject *__pyx_v_self) {
7044  PyObject *__pyx_r = 0;
7045  __Pyx_RefNannyDeclarations
7046  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7047  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7048 
7049  /* function exit code */
7050  __Pyx_RefNannyFinishContext();
7051  return __pyx_r;
7052 }
7053 
7054 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7055  PyObject *__pyx_r = NULL;
7056  __Pyx_RefNannyDeclarations
7057  __Pyx_RefNannySetupContext("__get__", 0);
7058  __Pyx_XDECREF(__pyx_r);
7059  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7060  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryElementsArray);
7061  goto __pyx_L0;
7062 
7063  /* function exit code */
7064  __pyx_L0:;
7065  __Pyx_XGIVEREF(__pyx_r);
7066  __Pyx_RefNannyFinishContext();
7067  return __pyx_r;
7068 }
7069 
7070 /* Python wrapper */
7071 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7072 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7073  int __pyx_r;
7074  __Pyx_RefNannyDeclarations
7075  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7076  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7077 
7078  /* function exit code */
7079  __Pyx_RefNannyFinishContext();
7080  return __pyx_r;
7081 }
7082 
7083 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7084  int __pyx_r;
7085  __Pyx_RefNannyDeclarations
7086  PyObject *__pyx_t_1 = NULL;
7087  __Pyx_RefNannySetupContext("__set__", 0);
7088  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 43, __pyx_L1_error)
7089  __pyx_t_1 = __pyx_v_value;
7090  __Pyx_INCREF(__pyx_t_1);
7091  __Pyx_GIVEREF(__pyx_t_1);
7092  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
7093  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7094  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)__pyx_t_1);
7095  __pyx_t_1 = 0;
7096 
7097  /* function exit code */
7098  __pyx_r = 0;
7099  goto __pyx_L0;
7100  __pyx_L1_error:;
7101  __Pyx_XDECREF(__pyx_t_1);
7102  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryElementsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7103  __pyx_r = -1;
7104  __pyx_L0:;
7105  __Pyx_RefNannyFinishContext();
7106  return __pyx_r;
7107 }
7108 
7109 /* Python wrapper */
7110 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7111 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(PyObject *__pyx_v_self) {
7112  int __pyx_r;
7113  __Pyx_RefNannyDeclarations
7114  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7115  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7116 
7117  /* function exit code */
7118  __Pyx_RefNannyFinishContext();
7119  return __pyx_r;
7120 }
7121 
7122 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7123  int __pyx_r;
7124  __Pyx_RefNannyDeclarations
7125  __Pyx_RefNannySetupContext("__del__", 0);
7126  __Pyx_INCREF(Py_None);
7127  __Pyx_GIVEREF(Py_None);
7128  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
7129  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7130  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)Py_None);
7131 
7132  /* function exit code */
7133  __pyx_r = 0;
7134  __Pyx_RefNannyFinishContext();
7135  return __pyx_r;
7136 }
7137 
7138 /* "cmeshTools.pxd":44
7139  * cdef np.ndarray elementBoundaryNodesArray,
7140  * cdef np.ndarray elementBoundaryElementsArray,
7141  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
7142  * cdef np.ndarray interiorElementBoundariesArray,
7143  * cdef np.ndarray exteriorElementBoundariesArray,
7144  */
7145 
7146 /* Python wrapper */
7147 static PyObject *__pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7148 static PyObject *__pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7149  PyObject *__pyx_r = 0;
7150  __Pyx_RefNannyDeclarations
7151  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7152  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7153 
7154  /* function exit code */
7155  __Pyx_RefNannyFinishContext();
7156  return __pyx_r;
7157 }
7158 
7159 static PyObject *__pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7160  PyObject *__pyx_r = NULL;
7161  __Pyx_RefNannyDeclarations
7162  __Pyx_RefNannySetupContext("__get__", 0);
7163  __Pyx_XDECREF(__pyx_r);
7164  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7165  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7166  goto __pyx_L0;
7167 
7168  /* function exit code */
7169  __pyx_L0:;
7170  __Pyx_XGIVEREF(__pyx_r);
7171  __Pyx_RefNannyFinishContext();
7172  return __pyx_r;
7173 }
7174 
7175 /* Python wrapper */
7176 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7177 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7178  int __pyx_r;
7179  __Pyx_RefNannyDeclarations
7180  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7181  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7182 
7183  /* function exit code */
7184  __Pyx_RefNannyFinishContext();
7185  return __pyx_r;
7186 }
7187 
7188 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7189  int __pyx_r;
7190  __Pyx_RefNannyDeclarations
7191  PyObject *__pyx_t_1 = NULL;
7192  __Pyx_RefNannySetupContext("__set__", 0);
7193  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 44, __pyx_L1_error)
7194  __pyx_t_1 = __pyx_v_value;
7195  __Pyx_INCREF(__pyx_t_1);
7196  __Pyx_GIVEREF(__pyx_t_1);
7197  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7198  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7199  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7200  __pyx_t_1 = 0;
7201 
7202  /* function exit code */
7203  __pyx_r = 0;
7204  goto __pyx_L0;
7205  __pyx_L1_error:;
7206  __Pyx_XDECREF(__pyx_t_1);
7207  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryLocalElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7208  __pyx_r = -1;
7209  __pyx_L0:;
7210  __Pyx_RefNannyFinishContext();
7211  return __pyx_r;
7212 }
7213 
7214 /* Python wrapper */
7215 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7216 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7217  int __pyx_r;
7218  __Pyx_RefNannyDeclarations
7219  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7220  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7221 
7222  /* function exit code */
7223  __Pyx_RefNannyFinishContext();
7224  return __pyx_r;
7225 }
7226 
7227 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7228  int __pyx_r;
7229  __Pyx_RefNannyDeclarations
7230  __Pyx_RefNannySetupContext("__del__", 0);
7231  __Pyx_INCREF(Py_None);
7232  __Pyx_GIVEREF(Py_None);
7233  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7234  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7235  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None);
7236 
7237  /* function exit code */
7238  __pyx_r = 0;
7239  __Pyx_RefNannyFinishContext();
7240  return __pyx_r;
7241 }
7242 
7243 /* "cmeshTools.pxd":45
7244  * cdef np.ndarray elementBoundaryElementsArray,
7245  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7246  * cdef np.ndarray interiorElementBoundariesArray, # <<<<<<<<<<<<<<
7247  * cdef np.ndarray exteriorElementBoundariesArray,
7248  * cdef np.ndarray edgeNodesArray,
7249  */
7250 
7251 /* Python wrapper */
7252 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7253 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7254  PyObject *__pyx_r = 0;
7255  __Pyx_RefNannyDeclarations
7256  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7257  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7258 
7259  /* function exit code */
7260  __Pyx_RefNannyFinishContext();
7261  return __pyx_r;
7262 }
7263 
7264 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7265  PyObject *__pyx_r = NULL;
7266  __Pyx_RefNannyDeclarations
7267  __Pyx_RefNannySetupContext("__get__", 0);
7268  __Pyx_XDECREF(__pyx_r);
7269  __Pyx_INCREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7270  __pyx_r = ((PyObject *)__pyx_v_self->interiorElementBoundariesArray);
7271  goto __pyx_L0;
7272 
7273  /* function exit code */
7274  __pyx_L0:;
7275  __Pyx_XGIVEREF(__pyx_r);
7276  __Pyx_RefNannyFinishContext();
7277  return __pyx_r;
7278 }
7279 
7280 /* Python wrapper */
7281 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7282 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7283  int __pyx_r;
7284  __Pyx_RefNannyDeclarations
7285  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7286  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7287 
7288  /* function exit code */
7289  __Pyx_RefNannyFinishContext();
7290  return __pyx_r;
7291 }
7292 
7293 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7294  int __pyx_r;
7295  __Pyx_RefNannyDeclarations
7296  PyObject *__pyx_t_1 = NULL;
7297  __Pyx_RefNannySetupContext("__set__", 0);
7298  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 45, __pyx_L1_error)
7299  __pyx_t_1 = __pyx_v_value;
7300  __Pyx_INCREF(__pyx_t_1);
7301  __Pyx_GIVEREF(__pyx_t_1);
7302  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
7303  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7304  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7305  __pyx_t_1 = 0;
7306 
7307  /* function exit code */
7308  __pyx_r = 0;
7309  goto __pyx_L0;
7310  __pyx_L1_error:;
7311  __Pyx_XDECREF(__pyx_t_1);
7312  __Pyx_AddTraceback("cmeshTools.CMesh.interiorElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7313  __pyx_r = -1;
7314  __pyx_L0:;
7315  __Pyx_RefNannyFinishContext();
7316  return __pyx_r;
7317 }
7318 
7319 /* Python wrapper */
7320 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7321 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7322  int __pyx_r;
7323  __Pyx_RefNannyDeclarations
7324  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7325  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7326 
7327  /* function exit code */
7328  __Pyx_RefNannyFinishContext();
7329  return __pyx_r;
7330 }
7331 
7332 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7333  int __pyx_r;
7334  __Pyx_RefNannyDeclarations
7335  __Pyx_RefNannySetupContext("__del__", 0);
7336  __Pyx_INCREF(Py_None);
7337  __Pyx_GIVEREF(Py_None);
7338  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
7339  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7340  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)Py_None);
7341 
7342  /* function exit code */
7343  __pyx_r = 0;
7344  __Pyx_RefNannyFinishContext();
7345  return __pyx_r;
7346 }
7347 
7348 /* "cmeshTools.pxd":46
7349  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7350  * cdef np.ndarray interiorElementBoundariesArray,
7351  * cdef np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
7352  * cdef np.ndarray edgeNodesArray,
7353  * cdef np.ndarray nodeStarArray,
7354  */
7355 
7356 /* Python wrapper */
7357 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7358 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7359  PyObject *__pyx_r = 0;
7360  __Pyx_RefNannyDeclarations
7361  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7362  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7363 
7364  /* function exit code */
7365  __Pyx_RefNannyFinishContext();
7366  return __pyx_r;
7367 }
7368 
7369 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7370  PyObject *__pyx_r = NULL;
7371  __Pyx_RefNannyDeclarations
7372  __Pyx_RefNannySetupContext("__get__", 0);
7373  __Pyx_XDECREF(__pyx_r);
7374  __Pyx_INCREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7375  __pyx_r = ((PyObject *)__pyx_v_self->exteriorElementBoundariesArray);
7376  goto __pyx_L0;
7377 
7378  /* function exit code */
7379  __pyx_L0:;
7380  __Pyx_XGIVEREF(__pyx_r);
7381  __Pyx_RefNannyFinishContext();
7382  return __pyx_r;
7383 }
7384 
7385 /* Python wrapper */
7386 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7387 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7388  int __pyx_r;
7389  __Pyx_RefNannyDeclarations
7390  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7391  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7392 
7393  /* function exit code */
7394  __Pyx_RefNannyFinishContext();
7395  return __pyx_r;
7396 }
7397 
7398 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7399  int __pyx_r;
7400  __Pyx_RefNannyDeclarations
7401  PyObject *__pyx_t_1 = NULL;
7402  __Pyx_RefNannySetupContext("__set__", 0);
7403  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 46, __pyx_L1_error)
7404  __pyx_t_1 = __pyx_v_value;
7405  __Pyx_INCREF(__pyx_t_1);
7406  __Pyx_GIVEREF(__pyx_t_1);
7407  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
7408  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7409  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7410  __pyx_t_1 = 0;
7411 
7412  /* function exit code */
7413  __pyx_r = 0;
7414  goto __pyx_L0;
7415  __pyx_L1_error:;
7416  __Pyx_XDECREF(__pyx_t_1);
7417  __Pyx_AddTraceback("cmeshTools.CMesh.exteriorElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7418  __pyx_r = -1;
7419  __pyx_L0:;
7420  __Pyx_RefNannyFinishContext();
7421  return __pyx_r;
7422 }
7423 
7424 /* Python wrapper */
7425 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7426 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7427  int __pyx_r;
7428  __Pyx_RefNannyDeclarations
7429  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7430  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7431 
7432  /* function exit code */
7433  __Pyx_RefNannyFinishContext();
7434  return __pyx_r;
7435 }
7436 
7437 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7438  int __pyx_r;
7439  __Pyx_RefNannyDeclarations
7440  __Pyx_RefNannySetupContext("__del__", 0);
7441  __Pyx_INCREF(Py_None);
7442  __Pyx_GIVEREF(Py_None);
7443  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
7444  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7445  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None);
7446 
7447  /* function exit code */
7448  __pyx_r = 0;
7449  __Pyx_RefNannyFinishContext();
7450  return __pyx_r;
7451 }
7452 
7453 /* "cmeshTools.pxd":47
7454  * cdef np.ndarray interiorElementBoundariesArray,
7455  * cdef np.ndarray exteriorElementBoundariesArray,
7456  * cdef np.ndarray edgeNodesArray, # <<<<<<<<<<<<<<
7457  * cdef np.ndarray nodeStarArray,
7458  * cdef np.ndarray nodeStarOffsets,
7459  */
7460 
7461 /* Python wrapper */
7462 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7463 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(PyObject *__pyx_v_self) {
7464  PyObject *__pyx_r = 0;
7465  __Pyx_RefNannyDeclarations
7466  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7467  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7468 
7469  /* function exit code */
7470  __Pyx_RefNannyFinishContext();
7471  return __pyx_r;
7472 }
7473 
7474 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7475  PyObject *__pyx_r = NULL;
7476  __Pyx_RefNannyDeclarations
7477  __Pyx_RefNannySetupContext("__get__", 0);
7478  __Pyx_XDECREF(__pyx_r);
7479  __Pyx_INCREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7480  __pyx_r = ((PyObject *)__pyx_v_self->edgeNodesArray);
7481  goto __pyx_L0;
7482 
7483  /* function exit code */
7484  __pyx_L0:;
7485  __Pyx_XGIVEREF(__pyx_r);
7486  __Pyx_RefNannyFinishContext();
7487  return __pyx_r;
7488 }
7489 
7490 /* Python wrapper */
7491 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7492 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7493  int __pyx_r;
7494  __Pyx_RefNannyDeclarations
7495  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7496  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7497 
7498  /* function exit code */
7499  __Pyx_RefNannyFinishContext();
7500  return __pyx_r;
7501 }
7502 
7503 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7504  int __pyx_r;
7505  __Pyx_RefNannyDeclarations
7506  PyObject *__pyx_t_1 = NULL;
7507  __Pyx_RefNannySetupContext("__set__", 0);
7508  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 47, __pyx_L1_error)
7509  __pyx_t_1 = __pyx_v_value;
7510  __Pyx_INCREF(__pyx_t_1);
7511  __Pyx_GIVEREF(__pyx_t_1);
7512  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
7513  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7514  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)__pyx_t_1);
7515  __pyx_t_1 = 0;
7516 
7517  /* function exit code */
7518  __pyx_r = 0;
7519  goto __pyx_L0;
7520  __pyx_L1_error:;
7521  __Pyx_XDECREF(__pyx_t_1);
7522  __Pyx_AddTraceback("cmeshTools.CMesh.edgeNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7523  __pyx_r = -1;
7524  __pyx_L0:;
7525  __Pyx_RefNannyFinishContext();
7526  return __pyx_r;
7527 }
7528 
7529 /* Python wrapper */
7530 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7531 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(PyObject *__pyx_v_self) {
7532  int __pyx_r;
7533  __Pyx_RefNannyDeclarations
7534  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7535  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7536 
7537  /* function exit code */
7538  __Pyx_RefNannyFinishContext();
7539  return __pyx_r;
7540 }
7541 
7542 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7543  int __pyx_r;
7544  __Pyx_RefNannyDeclarations
7545  __Pyx_RefNannySetupContext("__del__", 0);
7546  __Pyx_INCREF(Py_None);
7547  __Pyx_GIVEREF(Py_None);
7548  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
7549  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7550  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)Py_None);
7551 
7552  /* function exit code */
7553  __pyx_r = 0;
7554  __Pyx_RefNannyFinishContext();
7555  return __pyx_r;
7556 }
7557 
7558 /* "cmeshTools.pxd":48
7559  * cdef np.ndarray exteriorElementBoundariesArray,
7560  * cdef np.ndarray edgeNodesArray,
7561  * cdef np.ndarray nodeStarArray, # <<<<<<<<<<<<<<
7562  * cdef np.ndarray nodeStarOffsets,
7563  * cdef np.ndarray elementMaterialTypes,
7564  */
7565 
7566 /* Python wrapper */
7567 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7568 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(PyObject *__pyx_v_self) {
7569  PyObject *__pyx_r = 0;
7570  __Pyx_RefNannyDeclarations
7571  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7572  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7573 
7574  /* function exit code */
7575  __Pyx_RefNannyFinishContext();
7576  return __pyx_r;
7577 }
7578 
7579 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7580  PyObject *__pyx_r = NULL;
7581  __Pyx_RefNannyDeclarations
7582  __Pyx_RefNannySetupContext("__get__", 0);
7583  __Pyx_XDECREF(__pyx_r);
7584  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeStarArray));
7585  __pyx_r = ((PyObject *)__pyx_v_self->nodeStarArray);
7586  goto __pyx_L0;
7587 
7588  /* function exit code */
7589  __pyx_L0:;
7590  __Pyx_XGIVEREF(__pyx_r);
7591  __Pyx_RefNannyFinishContext();
7592  return __pyx_r;
7593 }
7594 
7595 /* Python wrapper */
7596 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7597 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7598  int __pyx_r;
7599  __Pyx_RefNannyDeclarations
7600  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7601  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7602 
7603  /* function exit code */
7604  __Pyx_RefNannyFinishContext();
7605  return __pyx_r;
7606 }
7607 
7608 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7609  int __pyx_r;
7610  __Pyx_RefNannyDeclarations
7611  PyObject *__pyx_t_1 = NULL;
7612  __Pyx_RefNannySetupContext("__set__", 0);
7613  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 48, __pyx_L1_error)
7614  __pyx_t_1 = __pyx_v_value;
7615  __Pyx_INCREF(__pyx_t_1);
7616  __Pyx_GIVEREF(__pyx_t_1);
7617  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
7618  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
7619  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_1);
7620  __pyx_t_1 = 0;
7621 
7622  /* function exit code */
7623  __pyx_r = 0;
7624  goto __pyx_L0;
7625  __pyx_L1_error:;
7626  __Pyx_XDECREF(__pyx_t_1);
7627  __Pyx_AddTraceback("cmeshTools.CMesh.nodeStarArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7628  __pyx_r = -1;
7629  __pyx_L0:;
7630  __Pyx_RefNannyFinishContext();
7631  return __pyx_r;
7632 }
7633 
7634 /* Python wrapper */
7635 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7636 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(PyObject *__pyx_v_self) {
7637  int __pyx_r;
7638  __Pyx_RefNannyDeclarations
7639  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7640  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7641 
7642  /* function exit code */
7643  __Pyx_RefNannyFinishContext();
7644  return __pyx_r;
7645 }
7646 
7647 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7648  int __pyx_r;
7649  __Pyx_RefNannyDeclarations
7650  __Pyx_RefNannySetupContext("__del__", 0);
7651  __Pyx_INCREF(Py_None);
7652  __Pyx_GIVEREF(Py_None);
7653  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
7654  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
7655  __pyx_v_self->nodeStarArray = ((PyArrayObject *)Py_None);
7656 
7657  /* function exit code */
7658  __pyx_r = 0;
7659  __Pyx_RefNannyFinishContext();
7660  return __pyx_r;
7661 }
7662 
7663 /* "cmeshTools.pxd":49
7664  * cdef np.ndarray edgeNodesArray,
7665  * cdef np.ndarray nodeStarArray,
7666  * cdef np.ndarray nodeStarOffsets, # <<<<<<<<<<<<<<
7667  * cdef np.ndarray elementMaterialTypes,
7668  * cdef np.ndarray elementBoundaryMaterialTypes,
7669  */
7670 
7671 /* Python wrapper */
7672 static PyObject *__pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
7673 static PyObject *__pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(PyObject *__pyx_v_self) {
7674  PyObject *__pyx_r = 0;
7675  __Pyx_RefNannyDeclarations
7676  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7677  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7678 
7679  /* function exit code */
7680  __Pyx_RefNannyFinishContext();
7681  return __pyx_r;
7682 }
7683 
7684 static PyObject *__pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7685  PyObject *__pyx_r = NULL;
7686  __Pyx_RefNannyDeclarations
7687  __Pyx_RefNannySetupContext("__get__", 0);
7688  __Pyx_XDECREF(__pyx_r);
7689  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7690  __pyx_r = ((PyObject *)__pyx_v_self->nodeStarOffsets);
7691  goto __pyx_L0;
7692 
7693  /* function exit code */
7694  __pyx_L0:;
7695  __Pyx_XGIVEREF(__pyx_r);
7696  __Pyx_RefNannyFinishContext();
7697  return __pyx_r;
7698 }
7699 
7700 /* Python wrapper */
7701 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7702 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7703  int __pyx_r;
7704  __Pyx_RefNannyDeclarations
7705  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7706  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7707 
7708  /* function exit code */
7709  __Pyx_RefNannyFinishContext();
7710  return __pyx_r;
7711 }
7712 
7713 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7714  int __pyx_r;
7715  __Pyx_RefNannyDeclarations
7716  PyObject *__pyx_t_1 = NULL;
7717  __Pyx_RefNannySetupContext("__set__", 0);
7718  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 49, __pyx_L1_error)
7719  __pyx_t_1 = __pyx_v_value;
7720  __Pyx_INCREF(__pyx_t_1);
7721  __Pyx_GIVEREF(__pyx_t_1);
7722  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
7723  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7724  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)__pyx_t_1);
7725  __pyx_t_1 = 0;
7726 
7727  /* function exit code */
7728  __pyx_r = 0;
7729  goto __pyx_L0;
7730  __pyx_L1_error:;
7731  __Pyx_XDECREF(__pyx_t_1);
7732  __Pyx_AddTraceback("cmeshTools.CMesh.nodeStarOffsets.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7733  __pyx_r = -1;
7734  __pyx_L0:;
7735  __Pyx_RefNannyFinishContext();
7736  return __pyx_r;
7737 }
7738 
7739 /* Python wrapper */
7740 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(PyObject *__pyx_v_self); /*proto*/
7741 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(PyObject *__pyx_v_self) {
7742  int __pyx_r;
7743  __Pyx_RefNannyDeclarations
7744  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7745  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7746 
7747  /* function exit code */
7748  __Pyx_RefNannyFinishContext();
7749  return __pyx_r;
7750 }
7751 
7752 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7753  int __pyx_r;
7754  __Pyx_RefNannyDeclarations
7755  __Pyx_RefNannySetupContext("__del__", 0);
7756  __Pyx_INCREF(Py_None);
7757  __Pyx_GIVEREF(Py_None);
7758  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
7759  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7760  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)Py_None);
7761 
7762  /* function exit code */
7763  __pyx_r = 0;
7764  __Pyx_RefNannyFinishContext();
7765  return __pyx_r;
7766 }
7767 
7768 /* "cmeshTools.pxd":50
7769  * cdef np.ndarray nodeStarArray,
7770  * cdef np.ndarray nodeStarOffsets,
7771  * cdef np.ndarray elementMaterialTypes, # <<<<<<<<<<<<<<
7772  * cdef np.ndarray elementBoundaryMaterialTypes,
7773  * cdef np.ndarray nodeMaterialTypes,
7774  */
7775 
7776 /* Python wrapper */
7777 static PyObject *__pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
7778 static PyObject *__pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(PyObject *__pyx_v_self) {
7779  PyObject *__pyx_r = 0;
7780  __Pyx_RefNannyDeclarations
7781  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7782  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7783 
7784  /* function exit code */
7785  __Pyx_RefNannyFinishContext();
7786  return __pyx_r;
7787 }
7788 
7789 static PyObject *__pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7790  PyObject *__pyx_r = NULL;
7791  __Pyx_RefNannyDeclarations
7792  __Pyx_RefNannySetupContext("__get__", 0);
7793  __Pyx_XDECREF(__pyx_r);
7794  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
7795  __pyx_r = ((PyObject *)__pyx_v_self->elementMaterialTypes);
7796  goto __pyx_L0;
7797 
7798  /* function exit code */
7799  __pyx_L0:;
7800  __Pyx_XGIVEREF(__pyx_r);
7801  __Pyx_RefNannyFinishContext();
7802  return __pyx_r;
7803 }
7804 
7805 /* Python wrapper */
7806 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7807 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7808  int __pyx_r;
7809  __Pyx_RefNannyDeclarations
7810  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7811  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7812 
7813  /* function exit code */
7814  __Pyx_RefNannyFinishContext();
7815  return __pyx_r;
7816 }
7817 
7818 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7819  int __pyx_r;
7820  __Pyx_RefNannyDeclarations
7821  PyObject *__pyx_t_1 = NULL;
7822  __Pyx_RefNannySetupContext("__set__", 0);
7823  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 50, __pyx_L1_error)
7824  __pyx_t_1 = __pyx_v_value;
7825  __Pyx_INCREF(__pyx_t_1);
7826  __Pyx_GIVEREF(__pyx_t_1);
7827  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
7828  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
7829  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)__pyx_t_1);
7830  __pyx_t_1 = 0;
7831 
7832  /* function exit code */
7833  __pyx_r = 0;
7834  goto __pyx_L0;
7835  __pyx_L1_error:;
7836  __Pyx_XDECREF(__pyx_t_1);
7837  __Pyx_AddTraceback("cmeshTools.CMesh.elementMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7838  __pyx_r = -1;
7839  __pyx_L0:;
7840  __Pyx_RefNannyFinishContext();
7841  return __pyx_r;
7842 }
7843 
7844 /* Python wrapper */
7845 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
7846 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(PyObject *__pyx_v_self) {
7847  int __pyx_r;
7848  __Pyx_RefNannyDeclarations
7849  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7850  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7851 
7852  /* function exit code */
7853  __Pyx_RefNannyFinishContext();
7854  return __pyx_r;
7855 }
7856 
7857 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7858  int __pyx_r;
7859  __Pyx_RefNannyDeclarations
7860  __Pyx_RefNannySetupContext("__del__", 0);
7861  __Pyx_INCREF(Py_None);
7862  __Pyx_GIVEREF(Py_None);
7863  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
7864  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
7865  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)Py_None);
7866 
7867  /* function exit code */
7868  __pyx_r = 0;
7869  __Pyx_RefNannyFinishContext();
7870  return __pyx_r;
7871 }
7872 
7873 /* "cmeshTools.pxd":51
7874  * cdef np.ndarray nodeStarOffsets,
7875  * cdef np.ndarray elementMaterialTypes,
7876  * cdef np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
7877  * cdef np.ndarray nodeMaterialTypes,
7878  * cdef np.ndarray nodeArray,
7879  */
7880 
7881 /* Python wrapper */
7882 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
7883 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(PyObject *__pyx_v_self) {
7884  PyObject *__pyx_r = 0;
7885  __Pyx_RefNannyDeclarations
7886  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7887  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7888 
7889  /* function exit code */
7890  __Pyx_RefNannyFinishContext();
7891  return __pyx_r;
7892 }
7893 
7894 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7895  PyObject *__pyx_r = NULL;
7896  __Pyx_RefNannyDeclarations
7897  __Pyx_RefNannySetupContext("__get__", 0);
7898  __Pyx_XDECREF(__pyx_r);
7899  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
7900  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes);
7901  goto __pyx_L0;
7902 
7903  /* function exit code */
7904  __pyx_L0:;
7905  __Pyx_XGIVEREF(__pyx_r);
7906  __Pyx_RefNannyFinishContext();
7907  return __pyx_r;
7908 }
7909 
7910 /* Python wrapper */
7911 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7912 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7913  int __pyx_r;
7914  __Pyx_RefNannyDeclarations
7915  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7916  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7917 
7918  /* function exit code */
7919  __Pyx_RefNannyFinishContext();
7920  return __pyx_r;
7921 }
7922 
7923 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7924  int __pyx_r;
7925  __Pyx_RefNannyDeclarations
7926  PyObject *__pyx_t_1 = NULL;
7927  __Pyx_RefNannySetupContext("__set__", 0);
7928  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 51, __pyx_L1_error)
7929  __pyx_t_1 = __pyx_v_value;
7930  __Pyx_INCREF(__pyx_t_1);
7931  __Pyx_GIVEREF(__pyx_t_1);
7932  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
7933  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
7934  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)__pyx_t_1);
7935  __pyx_t_1 = 0;
7936 
7937  /* function exit code */
7938  __pyx_r = 0;
7939  goto __pyx_L0;
7940  __pyx_L1_error:;
7941  __Pyx_XDECREF(__pyx_t_1);
7942  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7943  __pyx_r = -1;
7944  __pyx_L0:;
7945  __Pyx_RefNannyFinishContext();
7946  return __pyx_r;
7947 }
7948 
7949 /* Python wrapper */
7950 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
7951 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(PyObject *__pyx_v_self) {
7952  int __pyx_r;
7953  __Pyx_RefNannyDeclarations
7954  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7955  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7956 
7957  /* function exit code */
7958  __Pyx_RefNannyFinishContext();
7959  return __pyx_r;
7960 }
7961 
7962 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7963  int __pyx_r;
7964  __Pyx_RefNannyDeclarations
7965  __Pyx_RefNannySetupContext("__del__", 0);
7966  __Pyx_INCREF(Py_None);
7967  __Pyx_GIVEREF(Py_None);
7968  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
7969  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
7970  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None);
7971 
7972  /* function exit code */
7973  __pyx_r = 0;
7974  __Pyx_RefNannyFinishContext();
7975  return __pyx_r;
7976 }
7977 
7978 /* "cmeshTools.pxd":52
7979  * cdef np.ndarray elementMaterialTypes,
7980  * cdef np.ndarray elementBoundaryMaterialTypes,
7981  * cdef np.ndarray nodeMaterialTypes, # <<<<<<<<<<<<<<
7982  * cdef np.ndarray nodeArray,
7983  *
7984  */
7985 
7986 /* Python wrapper */
7987 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
7988 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(PyObject *__pyx_v_self) {
7989  PyObject *__pyx_r = 0;
7990  __Pyx_RefNannyDeclarations
7991  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7992  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7993 
7994  /* function exit code */
7995  __Pyx_RefNannyFinishContext();
7996  return __pyx_r;
7997 }
7998 
7999 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8000  PyObject *__pyx_r = NULL;
8001  __Pyx_RefNannyDeclarations
8002  __Pyx_RefNannySetupContext("__get__", 0);
8003  __Pyx_XDECREF(__pyx_r);
8004  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8005  __pyx_r = ((PyObject *)__pyx_v_self->nodeMaterialTypes);
8006  goto __pyx_L0;
8007 
8008  /* function exit code */
8009  __pyx_L0:;
8010  __Pyx_XGIVEREF(__pyx_r);
8011  __Pyx_RefNannyFinishContext();
8012  return __pyx_r;
8013 }
8014 
8015 /* Python wrapper */
8016 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8017 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8018  int __pyx_r;
8019  __Pyx_RefNannyDeclarations
8020  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8021  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8022 
8023  /* function exit code */
8024  __Pyx_RefNannyFinishContext();
8025  return __pyx_r;
8026 }
8027 
8028 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8029  int __pyx_r;
8030  __Pyx_RefNannyDeclarations
8031  PyObject *__pyx_t_1 = NULL;
8032  __Pyx_RefNannySetupContext("__set__", 0);
8033  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 52, __pyx_L1_error)
8034  __pyx_t_1 = __pyx_v_value;
8035  __Pyx_INCREF(__pyx_t_1);
8036  __Pyx_GIVEREF(__pyx_t_1);
8037  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
8038  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8039  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)__pyx_t_1);
8040  __pyx_t_1 = 0;
8041 
8042  /* function exit code */
8043  __pyx_r = 0;
8044  goto __pyx_L0;
8045  __pyx_L1_error:;
8046  __Pyx_XDECREF(__pyx_t_1);
8047  __Pyx_AddTraceback("cmeshTools.CMesh.nodeMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8048  __pyx_r = -1;
8049  __pyx_L0:;
8050  __Pyx_RefNannyFinishContext();
8051  return __pyx_r;
8052 }
8053 
8054 /* Python wrapper */
8055 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
8056 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(PyObject *__pyx_v_self) {
8057  int __pyx_r;
8058  __Pyx_RefNannyDeclarations
8059  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8060  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8061 
8062  /* function exit code */
8063  __Pyx_RefNannyFinishContext();
8064  return __pyx_r;
8065 }
8066 
8067 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8068  int __pyx_r;
8069  __Pyx_RefNannyDeclarations
8070  __Pyx_RefNannySetupContext("__del__", 0);
8071  __Pyx_INCREF(Py_None);
8072  __Pyx_GIVEREF(Py_None);
8073  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
8074  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8075  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)Py_None);
8076 
8077  /* function exit code */
8078  __pyx_r = 0;
8079  __Pyx_RefNannyFinishContext();
8080  return __pyx_r;
8081 }
8082 
8083 /* "cmeshTools.pxd":53
8084  * cdef np.ndarray elementBoundaryMaterialTypes,
8085  * cdef np.ndarray nodeMaterialTypes,
8086  * cdef np.ndarray nodeArray, # <<<<<<<<<<<<<<
8087  *
8088  * cdef int nx
8089  */
8090 
8091 /* Python wrapper */
8092 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(PyObject *__pyx_v_self); /*proto*/
8093 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(PyObject *__pyx_v_self) {
8094  PyObject *__pyx_r = 0;
8095  __Pyx_RefNannyDeclarations
8096  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8097  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8098 
8099  /* function exit code */
8100  __Pyx_RefNannyFinishContext();
8101  return __pyx_r;
8102 }
8103 
8104 static PyObject *__pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8105  PyObject *__pyx_r = NULL;
8106  __Pyx_RefNannyDeclarations
8107  __Pyx_RefNannySetupContext("__get__", 0);
8108  __Pyx_XDECREF(__pyx_r);
8109  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeArray));
8110  __pyx_r = ((PyObject *)__pyx_v_self->nodeArray);
8111  goto __pyx_L0;
8112 
8113  /* function exit code */
8114  __pyx_L0:;
8115  __Pyx_XGIVEREF(__pyx_r);
8116  __Pyx_RefNannyFinishContext();
8117  return __pyx_r;
8118 }
8119 
8120 /* Python wrapper */
8121 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8122 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8123  int __pyx_r;
8124  __Pyx_RefNannyDeclarations
8125  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8126  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8127 
8128  /* function exit code */
8129  __Pyx_RefNannyFinishContext();
8130  return __pyx_r;
8131 }
8132 
8133 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8134  int __pyx_r;
8135  __Pyx_RefNannyDeclarations
8136  PyObject *__pyx_t_1 = NULL;
8137  __Pyx_RefNannySetupContext("__set__", 0);
8138  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 53, __pyx_L1_error)
8139  __pyx_t_1 = __pyx_v_value;
8140  __Pyx_INCREF(__pyx_t_1);
8141  __Pyx_GIVEREF(__pyx_t_1);
8142  __Pyx_GOTREF(__pyx_v_self->nodeArray);
8143  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
8144  __pyx_v_self->nodeArray = ((PyArrayObject *)__pyx_t_1);
8145  __pyx_t_1 = 0;
8146 
8147  /* function exit code */
8148  __pyx_r = 0;
8149  goto __pyx_L0;
8150  __pyx_L1_error:;
8151  __Pyx_XDECREF(__pyx_t_1);
8152  __Pyx_AddTraceback("cmeshTools.CMesh.nodeArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8153  __pyx_r = -1;
8154  __pyx_L0:;
8155  __Pyx_RefNannyFinishContext();
8156  return __pyx_r;
8157 }
8158 
8159 /* Python wrapper */
8160 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(PyObject *__pyx_v_self); /*proto*/
8161 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(PyObject *__pyx_v_self) {
8162  int __pyx_r;
8163  __Pyx_RefNannyDeclarations
8164  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8165  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8166 
8167  /* function exit code */
8168  __Pyx_RefNannyFinishContext();
8169  return __pyx_r;
8170 }
8171 
8172 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8173  int __pyx_r;
8174  __Pyx_RefNannyDeclarations
8175  __Pyx_RefNannySetupContext("__del__", 0);
8176  __Pyx_INCREF(Py_None);
8177  __Pyx_GIVEREF(Py_None);
8178  __Pyx_GOTREF(__pyx_v_self->nodeArray);
8179  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
8180  __pyx_v_self->nodeArray = ((PyArrayObject *)Py_None);
8181 
8182  /* function exit code */
8183  __pyx_r = 0;
8184  __Pyx_RefNannyFinishContext();
8185  return __pyx_r;
8186 }
8187 
8188 /* "cmeshTools.pxd":55
8189  * cdef np.ndarray nodeArray,
8190  *
8191  * cdef int nx # <<<<<<<<<<<<<<
8192  * cdef int ny
8193  * cdef int nz #NURBS
8194  */
8195 
8196 /* Python wrapper */
8197 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(PyObject *__pyx_v_self); /*proto*/
8198 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(PyObject *__pyx_v_self) {
8199  PyObject *__pyx_r = 0;
8200  __Pyx_RefNannyDeclarations
8201  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8202  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nx___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8203 
8204  /* function exit code */
8205  __Pyx_RefNannyFinishContext();
8206  return __pyx_r;
8207 }
8208 
8209 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nx___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8210  PyObject *__pyx_r = NULL;
8211  __Pyx_RefNannyDeclarations
8212  PyObject *__pyx_t_1 = NULL;
8213  __Pyx_RefNannySetupContext("__get__", 0);
8214  __Pyx_XDECREF(__pyx_r);
8215  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nx); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 55, __pyx_L1_error)
8216  __Pyx_GOTREF(__pyx_t_1);
8217  __pyx_r = __pyx_t_1;
8218  __pyx_t_1 = 0;
8219  goto __pyx_L0;
8220 
8221  /* function exit code */
8222  __pyx_L1_error:;
8223  __Pyx_XDECREF(__pyx_t_1);
8224  __Pyx_AddTraceback("cmeshTools.CMesh.nx.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8225  __pyx_r = NULL;
8226  __pyx_L0:;
8227  __Pyx_XGIVEREF(__pyx_r);
8228  __Pyx_RefNannyFinishContext();
8229  return __pyx_r;
8230 }
8231 
8232 /* Python wrapper */
8233 static int __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8234 static int __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8235  int __pyx_r;
8236  __Pyx_RefNannyDeclarations
8237  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8238  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8239 
8240  /* function exit code */
8241  __Pyx_RefNannyFinishContext();
8242  return __pyx_r;
8243 }
8244 
8245 static int __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8246  int __pyx_r;
8247  __Pyx_RefNannyDeclarations
8248  int __pyx_t_1;
8249  __Pyx_RefNannySetupContext("__set__", 0);
8250  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 55, __pyx_L1_error)
8251  __pyx_v_self->nx = __pyx_t_1;
8252 
8253  /* function exit code */
8254  __pyx_r = 0;
8255  goto __pyx_L0;
8256  __pyx_L1_error:;
8257  __Pyx_AddTraceback("cmeshTools.CMesh.nx.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8258  __pyx_r = -1;
8259  __pyx_L0:;
8260  __Pyx_RefNannyFinishContext();
8261  return __pyx_r;
8262 }
8263 
8264 /* "cmeshTools.pxd":56
8265  *
8266  * cdef int nx
8267  * cdef int ny # <<<<<<<<<<<<<<
8268  * cdef int nz #NURBS
8269  * cdef int px
8270  */
8271 
8272 /* Python wrapper */
8273 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(PyObject *__pyx_v_self); /*proto*/
8274 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(PyObject *__pyx_v_self) {
8275  PyObject *__pyx_r = 0;
8276  __Pyx_RefNannyDeclarations
8277  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8278  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2ny___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8279 
8280  /* function exit code */
8281  __Pyx_RefNannyFinishContext();
8282  return __pyx_r;
8283 }
8284 
8285 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2ny___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8286  PyObject *__pyx_r = NULL;
8287  __Pyx_RefNannyDeclarations
8288  PyObject *__pyx_t_1 = NULL;
8289  __Pyx_RefNannySetupContext("__get__", 0);
8290  __Pyx_XDECREF(__pyx_r);
8291  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ny); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 56, __pyx_L1_error)
8292  __Pyx_GOTREF(__pyx_t_1);
8293  __pyx_r = __pyx_t_1;
8294  __pyx_t_1 = 0;
8295  goto __pyx_L0;
8296 
8297  /* function exit code */
8298  __pyx_L1_error:;
8299  __Pyx_XDECREF(__pyx_t_1);
8300  __Pyx_AddTraceback("cmeshTools.CMesh.ny.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8301  __pyx_r = NULL;
8302  __pyx_L0:;
8303  __Pyx_XGIVEREF(__pyx_r);
8304  __Pyx_RefNannyFinishContext();
8305  return __pyx_r;
8306 }
8307 
8308 /* Python wrapper */
8309 static int __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8310 static int __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8311  int __pyx_r;
8312  __Pyx_RefNannyDeclarations
8313  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8314  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8315 
8316  /* function exit code */
8317  __Pyx_RefNannyFinishContext();
8318  return __pyx_r;
8319 }
8320 
8321 static int __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8322  int __pyx_r;
8323  __Pyx_RefNannyDeclarations
8324  int __pyx_t_1;
8325  __Pyx_RefNannySetupContext("__set__", 0);
8326  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 56, __pyx_L1_error)
8327  __pyx_v_self->ny = __pyx_t_1;
8328 
8329  /* function exit code */
8330  __pyx_r = 0;
8331  goto __pyx_L0;
8332  __pyx_L1_error:;
8333  __Pyx_AddTraceback("cmeshTools.CMesh.ny.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8334  __pyx_r = -1;
8335  __pyx_L0:;
8336  __Pyx_RefNannyFinishContext();
8337  return __pyx_r;
8338 }
8339 
8340 /* "cmeshTools.pxd":57
8341  * cdef int nx
8342  * cdef int ny
8343  * cdef int nz #NURBS # <<<<<<<<<<<<<<
8344  * cdef int px
8345  * cdef int py
8346  */
8347 
8348 /* Python wrapper */
8349 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(PyObject *__pyx_v_self); /*proto*/
8350 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(PyObject *__pyx_v_self) {
8351  PyObject *__pyx_r = 0;
8352  __Pyx_RefNannyDeclarations
8353  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8354  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nz___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8355 
8356  /* function exit code */
8357  __Pyx_RefNannyFinishContext();
8358  return __pyx_r;
8359 }
8360 
8361 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8362  PyObject *__pyx_r = NULL;
8363  __Pyx_RefNannyDeclarations
8364  PyObject *__pyx_t_1 = NULL;
8365  __Pyx_RefNannySetupContext("__get__", 0);
8366  __Pyx_XDECREF(__pyx_r);
8367  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nz); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 57, __pyx_L1_error)
8368  __Pyx_GOTREF(__pyx_t_1);
8369  __pyx_r = __pyx_t_1;
8370  __pyx_t_1 = 0;
8371  goto __pyx_L0;
8372 
8373  /* function exit code */
8374  __pyx_L1_error:;
8375  __Pyx_XDECREF(__pyx_t_1);
8376  __Pyx_AddTraceback("cmeshTools.CMesh.nz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8377  __pyx_r = NULL;
8378  __pyx_L0:;
8379  __Pyx_XGIVEREF(__pyx_r);
8380  __Pyx_RefNannyFinishContext();
8381  return __pyx_r;
8382 }
8383 
8384 /* Python wrapper */
8385 static int __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8386 static int __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8387  int __pyx_r;
8388  __Pyx_RefNannyDeclarations
8389  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8390  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8391 
8392  /* function exit code */
8393  __Pyx_RefNannyFinishContext();
8394  return __pyx_r;
8395 }
8396 
8397 static int __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8398  int __pyx_r;
8399  __Pyx_RefNannyDeclarations
8400  int __pyx_t_1;
8401  __Pyx_RefNannySetupContext("__set__", 0);
8402  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 57, __pyx_L1_error)
8403  __pyx_v_self->nz = __pyx_t_1;
8404 
8405  /* function exit code */
8406  __pyx_r = 0;
8407  goto __pyx_L0;
8408  __pyx_L1_error:;
8409  __Pyx_AddTraceback("cmeshTools.CMesh.nz.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8410  __pyx_r = -1;
8411  __pyx_L0:;
8412  __Pyx_RefNannyFinishContext();
8413  return __pyx_r;
8414 }
8415 
8416 /* "cmeshTools.pxd":58
8417  * cdef int ny
8418  * cdef int nz #NURBS
8419  * cdef int px # <<<<<<<<<<<<<<
8420  * cdef int py
8421  * cdef int pz, #NURBS
8422  */
8423 
8424 /* Python wrapper */
8425 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2px_1__get__(PyObject *__pyx_v_self); /*proto*/
8426 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2px_1__get__(PyObject *__pyx_v_self) {
8427  PyObject *__pyx_r = 0;
8428  __Pyx_RefNannyDeclarations
8429  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8430  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2px___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8431 
8432  /* function exit code */
8433  __Pyx_RefNannyFinishContext();
8434  return __pyx_r;
8435 }
8436 
8437 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2px___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8438  PyObject *__pyx_r = NULL;
8439  __Pyx_RefNannyDeclarations
8440  PyObject *__pyx_t_1 = NULL;
8441  __Pyx_RefNannySetupContext("__get__", 0);
8442  __Pyx_XDECREF(__pyx_r);
8443  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->px); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 58, __pyx_L1_error)
8444  __Pyx_GOTREF(__pyx_t_1);
8445  __pyx_r = __pyx_t_1;
8446  __pyx_t_1 = 0;
8447  goto __pyx_L0;
8448 
8449  /* function exit code */
8450  __pyx_L1_error:;
8451  __Pyx_XDECREF(__pyx_t_1);
8452  __Pyx_AddTraceback("cmeshTools.CMesh.px.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8453  __pyx_r = NULL;
8454  __pyx_L0:;
8455  __Pyx_XGIVEREF(__pyx_r);
8456  __Pyx_RefNannyFinishContext();
8457  return __pyx_r;
8458 }
8459 
8460 /* Python wrapper */
8461 static int __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8462 static int __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8463  int __pyx_r;
8464  __Pyx_RefNannyDeclarations
8465  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8466  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8467 
8468  /* function exit code */
8469  __Pyx_RefNannyFinishContext();
8470  return __pyx_r;
8471 }
8472 
8473 static int __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8474  int __pyx_r;
8475  __Pyx_RefNannyDeclarations
8476  int __pyx_t_1;
8477  __Pyx_RefNannySetupContext("__set__", 0);
8478  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 58, __pyx_L1_error)
8479  __pyx_v_self->px = __pyx_t_1;
8480 
8481  /* function exit code */
8482  __pyx_r = 0;
8483  goto __pyx_L0;
8484  __pyx_L1_error:;
8485  __Pyx_AddTraceback("cmeshTools.CMesh.px.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8486  __pyx_r = -1;
8487  __pyx_L0:;
8488  __Pyx_RefNannyFinishContext();
8489  return __pyx_r;
8490 }
8491 
8492 /* "cmeshTools.pxd":59
8493  * cdef int nz #NURBS
8494  * cdef int px
8495  * cdef int py # <<<<<<<<<<<<<<
8496  * cdef int pz, #NURBS
8497  * # cdef int[:] elementIJK, #NURBS
8498  */
8499 
8500 /* Python wrapper */
8501 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2py_1__get__(PyObject *__pyx_v_self); /*proto*/
8502 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2py_1__get__(PyObject *__pyx_v_self) {
8503  PyObject *__pyx_r = 0;
8504  __Pyx_RefNannyDeclarations
8505  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8506  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2py___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8507 
8508  /* function exit code */
8509  __Pyx_RefNannyFinishContext();
8510  return __pyx_r;
8511 }
8512 
8513 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2py___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8514  PyObject *__pyx_r = NULL;
8515  __Pyx_RefNannyDeclarations
8516  PyObject *__pyx_t_1 = NULL;
8517  __Pyx_RefNannySetupContext("__get__", 0);
8518  __Pyx_XDECREF(__pyx_r);
8519  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->py); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 59, __pyx_L1_error)
8520  __Pyx_GOTREF(__pyx_t_1);
8521  __pyx_r = __pyx_t_1;
8522  __pyx_t_1 = 0;
8523  goto __pyx_L0;
8524 
8525  /* function exit code */
8526  __pyx_L1_error:;
8527  __Pyx_XDECREF(__pyx_t_1);
8528  __Pyx_AddTraceback("cmeshTools.CMesh.py.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8529  __pyx_r = NULL;
8530  __pyx_L0:;
8531  __Pyx_XGIVEREF(__pyx_r);
8532  __Pyx_RefNannyFinishContext();
8533  return __pyx_r;
8534 }
8535 
8536 /* Python wrapper */
8537 static int __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8538 static int __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8539  int __pyx_r;
8540  __Pyx_RefNannyDeclarations
8541  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8542  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8543 
8544  /* function exit code */
8545  __Pyx_RefNannyFinishContext();
8546  return __pyx_r;
8547 }
8548 
8549 static int __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8550  int __pyx_r;
8551  __Pyx_RefNannyDeclarations
8552  int __pyx_t_1;
8553  __Pyx_RefNannySetupContext("__set__", 0);
8554  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 59, __pyx_L1_error)
8555  __pyx_v_self->py = __pyx_t_1;
8556 
8557  /* function exit code */
8558  __pyx_r = 0;
8559  goto __pyx_L0;
8560  __pyx_L1_error:;
8561  __Pyx_AddTraceback("cmeshTools.CMesh.py.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8562  __pyx_r = -1;
8563  __pyx_L0:;
8564  __Pyx_RefNannyFinishContext();
8565  return __pyx_r;
8566 }
8567 
8568 /* "cmeshTools.pxd":60
8569  * cdef int px
8570  * cdef int py
8571  * cdef int pz, #NURBS # <<<<<<<<<<<<<<
8572  * # cdef int[:] elementIJK, #NURBS
8573  * # cdef double[:] weights, #NURBS
8574  */
8575 
8576 /* Python wrapper */
8577 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(PyObject *__pyx_v_self); /*proto*/
8578 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(PyObject *__pyx_v_self) {
8579  PyObject *__pyx_r = 0;
8580  __Pyx_RefNannyDeclarations
8581  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8582  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2pz___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8583 
8584  /* function exit code */
8585  __Pyx_RefNannyFinishContext();
8586  return __pyx_r;
8587 }
8588 
8589 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2pz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8590  PyObject *__pyx_r = NULL;
8591  __Pyx_RefNannyDeclarations
8592  PyObject *__pyx_t_1 = NULL;
8593  __Pyx_RefNannySetupContext("__get__", 0);
8594  __Pyx_XDECREF(__pyx_r);
8595  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pz); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 60, __pyx_L1_error)
8596  __Pyx_GOTREF(__pyx_t_1);
8597  __pyx_r = __pyx_t_1;
8598  __pyx_t_1 = 0;
8599  goto __pyx_L0;
8600 
8601  /* function exit code */
8602  __pyx_L1_error:;
8603  __Pyx_XDECREF(__pyx_t_1);
8604  __Pyx_AddTraceback("cmeshTools.CMesh.pz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8605  __pyx_r = NULL;
8606  __pyx_L0:;
8607  __Pyx_XGIVEREF(__pyx_r);
8608  __Pyx_RefNannyFinishContext();
8609  return __pyx_r;
8610 }
8611 
8612 /* Python wrapper */
8613 static int __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8614 static int __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8615  int __pyx_r;
8616  __Pyx_RefNannyDeclarations
8617  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8618  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8619 
8620  /* function exit code */
8621  __Pyx_RefNannyFinishContext();
8622  return __pyx_r;
8623 }
8624 
8625 static int __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8626  int __pyx_r;
8627  __Pyx_RefNannyDeclarations
8628  int __pyx_t_1;
8629  __Pyx_RefNannySetupContext("__set__", 0);
8630  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 60, __pyx_L1_error)
8631  __pyx_v_self->pz = __pyx_t_1;
8632 
8633  /* function exit code */
8634  __pyx_r = 0;
8635  goto __pyx_L0;
8636  __pyx_L1_error:;
8637  __Pyx_AddTraceback("cmeshTools.CMesh.pz.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8638  __pyx_r = -1;
8639  __pyx_L0:;
8640  __Pyx_RefNannyFinishContext();
8641  return __pyx_r;
8642 }
8643 
8644 /* "cmeshTools.pxd":74
8645  * # cdef double[:] nodeSupportArray,
8646  *
8647  * cdef np.ndarray elementIJK, #NURBS # <<<<<<<<<<<<<<
8648  * cdef np.ndarray weights, #NURBS
8649  * cdef np.ndarray U_KNOT, #NURBS
8650  */
8651 
8652 /* Python wrapper */
8653 static PyObject *__pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(PyObject *__pyx_v_self); /*proto*/
8654 static PyObject *__pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(PyObject *__pyx_v_self) {
8655  PyObject *__pyx_r = 0;
8656  __Pyx_RefNannyDeclarations
8657  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8658  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8659 
8660  /* function exit code */
8661  __Pyx_RefNannyFinishContext();
8662  return __pyx_r;
8663 }
8664 
8665 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8666  PyObject *__pyx_r = NULL;
8667  __Pyx_RefNannyDeclarations
8668  __Pyx_RefNannySetupContext("__get__", 0);
8669  __Pyx_XDECREF(__pyx_r);
8670  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementIJK));
8671  __pyx_r = ((PyObject *)__pyx_v_self->elementIJK);
8672  goto __pyx_L0;
8673 
8674  /* function exit code */
8675  __pyx_L0:;
8676  __Pyx_XGIVEREF(__pyx_r);
8677  __Pyx_RefNannyFinishContext();
8678  return __pyx_r;
8679 }
8680 
8681 /* Python wrapper */
8682 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8683 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8684  int __pyx_r;
8685  __Pyx_RefNannyDeclarations
8686  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8687  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8688 
8689  /* function exit code */
8690  __Pyx_RefNannyFinishContext();
8691  return __pyx_r;
8692 }
8693 
8694 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8695  int __pyx_r;
8696  __Pyx_RefNannyDeclarations
8697  PyObject *__pyx_t_1 = NULL;
8698  __Pyx_RefNannySetupContext("__set__", 0);
8699  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 74, __pyx_L1_error)
8700  __pyx_t_1 = __pyx_v_value;
8701  __Pyx_INCREF(__pyx_t_1);
8702  __Pyx_GIVEREF(__pyx_t_1);
8703  __Pyx_GOTREF(__pyx_v_self->elementIJK);
8704  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
8705  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_1);
8706  __pyx_t_1 = 0;
8707 
8708  /* function exit code */
8709  __pyx_r = 0;
8710  goto __pyx_L0;
8711  __pyx_L1_error:;
8712  __Pyx_XDECREF(__pyx_t_1);
8713  __Pyx_AddTraceback("cmeshTools.CMesh.elementIJK.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8714  __pyx_r = -1;
8715  __pyx_L0:;
8716  __Pyx_RefNannyFinishContext();
8717  return __pyx_r;
8718 }
8719 
8720 /* Python wrapper */
8721 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(PyObject *__pyx_v_self); /*proto*/
8722 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(PyObject *__pyx_v_self) {
8723  int __pyx_r;
8724  __Pyx_RefNannyDeclarations
8725  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8726  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8727 
8728  /* function exit code */
8729  __Pyx_RefNannyFinishContext();
8730  return __pyx_r;
8731 }
8732 
8733 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8734  int __pyx_r;
8735  __Pyx_RefNannyDeclarations
8736  __Pyx_RefNannySetupContext("__del__", 0);
8737  __Pyx_INCREF(Py_None);
8738  __Pyx_GIVEREF(Py_None);
8739  __Pyx_GOTREF(__pyx_v_self->elementIJK);
8740  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
8741  __pyx_v_self->elementIJK = ((PyArrayObject *)Py_None);
8742 
8743  /* function exit code */
8744  __pyx_r = 0;
8745  __Pyx_RefNannyFinishContext();
8746  return __pyx_r;
8747 }
8748 
8749 /* "cmeshTools.pxd":75
8750  *
8751  * cdef np.ndarray elementIJK, #NURBS
8752  * cdef np.ndarray weights, #NURBS # <<<<<<<<<<<<<<
8753  * cdef np.ndarray U_KNOT, #NURBS
8754  * cdef np.ndarray V_KNOT, #NURBS
8755  */
8756 
8757 /* Python wrapper */
8758 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/
8759 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(PyObject *__pyx_v_self) {
8760  PyObject *__pyx_r = 0;
8761  __Pyx_RefNannyDeclarations
8762  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8763  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8764 
8765  /* function exit code */
8766  __Pyx_RefNannyFinishContext();
8767  return __pyx_r;
8768 }
8769 
8770 static PyObject *__pyx_pf_10cmeshTools_5CMesh_7weights___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8771  PyObject *__pyx_r = NULL;
8772  __Pyx_RefNannyDeclarations
8773  __Pyx_RefNannySetupContext("__get__", 0);
8774  __Pyx_XDECREF(__pyx_r);
8775  __Pyx_INCREF(((PyObject *)__pyx_v_self->weights));
8776  __pyx_r = ((PyObject *)__pyx_v_self->weights);
8777  goto __pyx_L0;
8778 
8779  /* function exit code */
8780  __pyx_L0:;
8781  __Pyx_XGIVEREF(__pyx_r);
8782  __Pyx_RefNannyFinishContext();
8783  return __pyx_r;
8784 }
8785 
8786 /* Python wrapper */
8787 static int __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8788 static int __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8789  int __pyx_r;
8790  __Pyx_RefNannyDeclarations
8791  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8792  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8793 
8794  /* function exit code */
8795  __Pyx_RefNannyFinishContext();
8796  return __pyx_r;
8797 }
8798 
8799 static int __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8800  int __pyx_r;
8801  __Pyx_RefNannyDeclarations
8802  PyObject *__pyx_t_1 = NULL;
8803  __Pyx_RefNannySetupContext("__set__", 0);
8804  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 75, __pyx_L1_error)
8805  __pyx_t_1 = __pyx_v_value;
8806  __Pyx_INCREF(__pyx_t_1);
8807  __Pyx_GIVEREF(__pyx_t_1);
8808  __Pyx_GOTREF(__pyx_v_self->weights);
8809  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
8810  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_1);
8811  __pyx_t_1 = 0;
8812 
8813  /* function exit code */
8814  __pyx_r = 0;
8815  goto __pyx_L0;
8816  __pyx_L1_error:;
8817  __Pyx_XDECREF(__pyx_t_1);
8818  __Pyx_AddTraceback("cmeshTools.CMesh.weights.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8819  __pyx_r = -1;
8820  __pyx_L0:;
8821  __Pyx_RefNannyFinishContext();
8822  return __pyx_r;
8823 }
8824 
8825 /* Python wrapper */
8826 static int __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(PyObject *__pyx_v_self); /*proto*/
8827 static int __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(PyObject *__pyx_v_self) {
8828  int __pyx_r;
8829  __Pyx_RefNannyDeclarations
8830  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8831  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8832 
8833  /* function exit code */
8834  __Pyx_RefNannyFinishContext();
8835  return __pyx_r;
8836 }
8837 
8838 static int __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8839  int __pyx_r;
8840  __Pyx_RefNannyDeclarations
8841  __Pyx_RefNannySetupContext("__del__", 0);
8842  __Pyx_INCREF(Py_None);
8843  __Pyx_GIVEREF(Py_None);
8844  __Pyx_GOTREF(__pyx_v_self->weights);
8845  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
8846  __pyx_v_self->weights = ((PyArrayObject *)Py_None);
8847 
8848  /* function exit code */
8849  __pyx_r = 0;
8850  __Pyx_RefNannyFinishContext();
8851  return __pyx_r;
8852 }
8853 
8854 /* "cmeshTools.pxd":76
8855  * cdef np.ndarray elementIJK, #NURBS
8856  * cdef np.ndarray weights, #NURBS
8857  * cdef np.ndarray U_KNOT, #NURBS # <<<<<<<<<<<<<<
8858  * cdef np.ndarray V_KNOT, #NURBS
8859  * cdef np.ndarray W_KNOT, #NURBS
8860  */
8861 
8862 /* Python wrapper */
8863 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
8864 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(PyObject *__pyx_v_self) {
8865  PyObject *__pyx_r = 0;
8866  __Pyx_RefNannyDeclarations
8867  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8868  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8869 
8870  /* function exit code */
8871  __Pyx_RefNannyFinishContext();
8872  return __pyx_r;
8873 }
8874 
8875 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8876  PyObject *__pyx_r = NULL;
8877  __Pyx_RefNannyDeclarations
8878  __Pyx_RefNannySetupContext("__get__", 0);
8879  __Pyx_XDECREF(__pyx_r);
8880  __Pyx_INCREF(((PyObject *)__pyx_v_self->U_KNOT));
8881  __pyx_r = ((PyObject *)__pyx_v_self->U_KNOT);
8882  goto __pyx_L0;
8883 
8884  /* function exit code */
8885  __pyx_L0:;
8886  __Pyx_XGIVEREF(__pyx_r);
8887  __Pyx_RefNannyFinishContext();
8888  return __pyx_r;
8889 }
8890 
8891 /* Python wrapper */
8892 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8893 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8894  int __pyx_r;
8895  __Pyx_RefNannyDeclarations
8896  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8897  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8898 
8899  /* function exit code */
8900  __Pyx_RefNannyFinishContext();
8901  return __pyx_r;
8902 }
8903 
8904 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8905  int __pyx_r;
8906  __Pyx_RefNannyDeclarations
8907  PyObject *__pyx_t_1 = NULL;
8908  __Pyx_RefNannySetupContext("__set__", 0);
8909  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 76, __pyx_L1_error)
8910  __pyx_t_1 = __pyx_v_value;
8911  __Pyx_INCREF(__pyx_t_1);
8912  __Pyx_GIVEREF(__pyx_t_1);
8913  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
8914  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
8915  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_1);
8916  __pyx_t_1 = 0;
8917 
8918  /* function exit code */
8919  __pyx_r = 0;
8920  goto __pyx_L0;
8921  __pyx_L1_error:;
8922  __Pyx_XDECREF(__pyx_t_1);
8923  __Pyx_AddTraceback("cmeshTools.CMesh.U_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8924  __pyx_r = -1;
8925  __pyx_L0:;
8926  __Pyx_RefNannyFinishContext();
8927  return __pyx_r;
8928 }
8929 
8930 /* Python wrapper */
8931 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
8932 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(PyObject *__pyx_v_self) {
8933  int __pyx_r;
8934  __Pyx_RefNannyDeclarations
8935  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8936  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8937 
8938  /* function exit code */
8939  __Pyx_RefNannyFinishContext();
8940  return __pyx_r;
8941 }
8942 
8943 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8944  int __pyx_r;
8945  __Pyx_RefNannyDeclarations
8946  __Pyx_RefNannySetupContext("__del__", 0);
8947  __Pyx_INCREF(Py_None);
8948  __Pyx_GIVEREF(Py_None);
8949  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
8950  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
8951  __pyx_v_self->U_KNOT = ((PyArrayObject *)Py_None);
8952 
8953  /* function exit code */
8954  __pyx_r = 0;
8955  __Pyx_RefNannyFinishContext();
8956  return __pyx_r;
8957 }
8958 
8959 /* "cmeshTools.pxd":77
8960  * cdef np.ndarray weights, #NURBS
8961  * cdef np.ndarray U_KNOT, #NURBS
8962  * cdef np.ndarray V_KNOT, #NURBS # <<<<<<<<<<<<<<
8963  * cdef np.ndarray W_KNOT, #NURBS
8964  * cdef np.ndarray elementDiametersArray,
8965  */
8966 
8967 /* Python wrapper */
8968 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
8969 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(PyObject *__pyx_v_self) {
8970  PyObject *__pyx_r = 0;
8971  __Pyx_RefNannyDeclarations
8972  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8973  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8974 
8975  /* function exit code */
8976  __Pyx_RefNannyFinishContext();
8977  return __pyx_r;
8978 }
8979 
8980 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8981  PyObject *__pyx_r = NULL;
8982  __Pyx_RefNannyDeclarations
8983  __Pyx_RefNannySetupContext("__get__", 0);
8984  __Pyx_XDECREF(__pyx_r);
8985  __Pyx_INCREF(((PyObject *)__pyx_v_self->V_KNOT));
8986  __pyx_r = ((PyObject *)__pyx_v_self->V_KNOT);
8987  goto __pyx_L0;
8988 
8989  /* function exit code */
8990  __pyx_L0:;
8991  __Pyx_XGIVEREF(__pyx_r);
8992  __Pyx_RefNannyFinishContext();
8993  return __pyx_r;
8994 }
8995 
8996 /* Python wrapper */
8997 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8998 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8999  int __pyx_r;
9000  __Pyx_RefNannyDeclarations
9001  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9002  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9003 
9004  /* function exit code */
9005  __Pyx_RefNannyFinishContext();
9006  return __pyx_r;
9007 }
9008 
9009 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9010  int __pyx_r;
9011  __Pyx_RefNannyDeclarations
9012  PyObject *__pyx_t_1 = NULL;
9013  __Pyx_RefNannySetupContext("__set__", 0);
9014  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 77, __pyx_L1_error)
9015  __pyx_t_1 = __pyx_v_value;
9016  __Pyx_INCREF(__pyx_t_1);
9017  __Pyx_GIVEREF(__pyx_t_1);
9018  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
9019  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
9020  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_1);
9021  __pyx_t_1 = 0;
9022 
9023  /* function exit code */
9024  __pyx_r = 0;
9025  goto __pyx_L0;
9026  __pyx_L1_error:;
9027  __Pyx_XDECREF(__pyx_t_1);
9028  __Pyx_AddTraceback("cmeshTools.CMesh.V_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9029  __pyx_r = -1;
9030  __pyx_L0:;
9031  __Pyx_RefNannyFinishContext();
9032  return __pyx_r;
9033 }
9034 
9035 /* Python wrapper */
9036 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
9037 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(PyObject *__pyx_v_self) {
9038  int __pyx_r;
9039  __Pyx_RefNannyDeclarations
9040  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9041  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9042 
9043  /* function exit code */
9044  __Pyx_RefNannyFinishContext();
9045  return __pyx_r;
9046 }
9047 
9048 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9049  int __pyx_r;
9050  __Pyx_RefNannyDeclarations
9051  __Pyx_RefNannySetupContext("__del__", 0);
9052  __Pyx_INCREF(Py_None);
9053  __Pyx_GIVEREF(Py_None);
9054  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
9055  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
9056  __pyx_v_self->V_KNOT = ((PyArrayObject *)Py_None);
9057 
9058  /* function exit code */
9059  __pyx_r = 0;
9060  __Pyx_RefNannyFinishContext();
9061  return __pyx_r;
9062 }
9063 
9064 /* "cmeshTools.pxd":78
9065  * cdef np.ndarray U_KNOT, #NURBS
9066  * cdef np.ndarray V_KNOT, #NURBS
9067  * cdef np.ndarray W_KNOT, #NURBS # <<<<<<<<<<<<<<
9068  * cdef np.ndarray elementDiametersArray,
9069  * cdef np.ndarray elementInnerDiametersArray,
9070  */
9071 
9072 /* Python wrapper */
9073 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
9074 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(PyObject *__pyx_v_self) {
9075  PyObject *__pyx_r = 0;
9076  __Pyx_RefNannyDeclarations
9077  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9078  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9079 
9080  /* function exit code */
9081  __Pyx_RefNannyFinishContext();
9082  return __pyx_r;
9083 }
9084 
9085 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9086  PyObject *__pyx_r = NULL;
9087  __Pyx_RefNannyDeclarations
9088  __Pyx_RefNannySetupContext("__get__", 0);
9089  __Pyx_XDECREF(__pyx_r);
9090  __Pyx_INCREF(((PyObject *)__pyx_v_self->W_KNOT));
9091  __pyx_r = ((PyObject *)__pyx_v_self->W_KNOT);
9092  goto __pyx_L0;
9093 
9094  /* function exit code */
9095  __pyx_L0:;
9096  __Pyx_XGIVEREF(__pyx_r);
9097  __Pyx_RefNannyFinishContext();
9098  return __pyx_r;
9099 }
9100 
9101 /* Python wrapper */
9102 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9103 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9104  int __pyx_r;
9105  __Pyx_RefNannyDeclarations
9106  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9107  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9108 
9109  /* function exit code */
9110  __Pyx_RefNannyFinishContext();
9111  return __pyx_r;
9112 }
9113 
9114 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9115  int __pyx_r;
9116  __Pyx_RefNannyDeclarations
9117  PyObject *__pyx_t_1 = NULL;
9118  __Pyx_RefNannySetupContext("__set__", 0);
9119  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 78, __pyx_L1_error)
9120  __pyx_t_1 = __pyx_v_value;
9121  __Pyx_INCREF(__pyx_t_1);
9122  __Pyx_GIVEREF(__pyx_t_1);
9123  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
9124  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
9125  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_1);
9126  __pyx_t_1 = 0;
9127 
9128  /* function exit code */
9129  __pyx_r = 0;
9130  goto __pyx_L0;
9131  __pyx_L1_error:;
9132  __Pyx_XDECREF(__pyx_t_1);
9133  __Pyx_AddTraceback("cmeshTools.CMesh.W_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9134  __pyx_r = -1;
9135  __pyx_L0:;
9136  __Pyx_RefNannyFinishContext();
9137  return __pyx_r;
9138 }
9139 
9140 /* Python wrapper */
9141 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
9142 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(PyObject *__pyx_v_self) {
9143  int __pyx_r;
9144  __Pyx_RefNannyDeclarations
9145  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9146  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9147 
9148  /* function exit code */
9149  __Pyx_RefNannyFinishContext();
9150  return __pyx_r;
9151 }
9152 
9153 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9154  int __pyx_r;
9155  __Pyx_RefNannyDeclarations
9156  __Pyx_RefNannySetupContext("__del__", 0);
9157  __Pyx_INCREF(Py_None);
9158  __Pyx_GIVEREF(Py_None);
9159  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
9160  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
9161  __pyx_v_self->W_KNOT = ((PyArrayObject *)Py_None);
9162 
9163  /* function exit code */
9164  __pyx_r = 0;
9165  __Pyx_RefNannyFinishContext();
9166  return __pyx_r;
9167 }
9168 
9169 /* "cmeshTools.pxd":79
9170  * cdef np.ndarray V_KNOT, #NURBS
9171  * cdef np.ndarray W_KNOT, #NURBS
9172  * cdef np.ndarray elementDiametersArray, # <<<<<<<<<<<<<<
9173  * cdef np.ndarray elementInnerDiametersArray,
9174  * cdef np.ndarray elementBoundaryDiametersArray,
9175  */
9176 
9177 /* Python wrapper */
9178 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9179 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(PyObject *__pyx_v_self) {
9180  PyObject *__pyx_r = 0;
9181  __Pyx_RefNannyDeclarations
9182  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9183  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9184 
9185  /* function exit code */
9186  __Pyx_RefNannyFinishContext();
9187  return __pyx_r;
9188 }
9189 
9190 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9191  PyObject *__pyx_r = NULL;
9192  __Pyx_RefNannyDeclarations
9193  __Pyx_RefNannySetupContext("__get__", 0);
9194  __Pyx_XDECREF(__pyx_r);
9195  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9196  __pyx_r = ((PyObject *)__pyx_v_self->elementDiametersArray);
9197  goto __pyx_L0;
9198 
9199  /* function exit code */
9200  __pyx_L0:;
9201  __Pyx_XGIVEREF(__pyx_r);
9202  __Pyx_RefNannyFinishContext();
9203  return __pyx_r;
9204 }
9205 
9206 /* Python wrapper */
9207 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9208 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9209  int __pyx_r;
9210  __Pyx_RefNannyDeclarations
9211  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9212  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9213 
9214  /* function exit code */
9215  __Pyx_RefNannyFinishContext();
9216  return __pyx_r;
9217 }
9218 
9219 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9220  int __pyx_r;
9221  __Pyx_RefNannyDeclarations
9222  PyObject *__pyx_t_1 = NULL;
9223  __Pyx_RefNannySetupContext("__set__", 0);
9224  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 79, __pyx_L1_error)
9225  __pyx_t_1 = __pyx_v_value;
9226  __Pyx_INCREF(__pyx_t_1);
9227  __Pyx_GIVEREF(__pyx_t_1);
9228  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
9229  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9230  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)__pyx_t_1);
9231  __pyx_t_1 = 0;
9232 
9233  /* function exit code */
9234  __pyx_r = 0;
9235  goto __pyx_L0;
9236  __pyx_L1_error:;
9237  __Pyx_XDECREF(__pyx_t_1);
9238  __Pyx_AddTraceback("cmeshTools.CMesh.elementDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9239  __pyx_r = -1;
9240  __pyx_L0:;
9241  __Pyx_RefNannyFinishContext();
9242  return __pyx_r;
9243 }
9244 
9245 /* Python wrapper */
9246 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9247 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(PyObject *__pyx_v_self) {
9248  int __pyx_r;
9249  __Pyx_RefNannyDeclarations
9250  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9251  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9252 
9253  /* function exit code */
9254  __Pyx_RefNannyFinishContext();
9255  return __pyx_r;
9256 }
9257 
9258 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9259  int __pyx_r;
9260  __Pyx_RefNannyDeclarations
9261  __Pyx_RefNannySetupContext("__del__", 0);
9262  __Pyx_INCREF(Py_None);
9263  __Pyx_GIVEREF(Py_None);
9264  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
9265  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9266  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)Py_None);
9267 
9268  /* function exit code */
9269  __pyx_r = 0;
9270  __Pyx_RefNannyFinishContext();
9271  return __pyx_r;
9272 }
9273 
9274 /* "cmeshTools.pxd":80
9275  * cdef np.ndarray W_KNOT, #NURBS
9276  * cdef np.ndarray elementDiametersArray,
9277  * cdef np.ndarray elementInnerDiametersArray, # <<<<<<<<<<<<<<
9278  * cdef np.ndarray elementBoundaryDiametersArray,
9279  * cdef np.ndarray elementBarycentersArray,
9280  */
9281 
9282 /* Python wrapper */
9283 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9284 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(PyObject *__pyx_v_self) {
9285  PyObject *__pyx_r = 0;
9286  __Pyx_RefNannyDeclarations
9287  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9288  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9289 
9290  /* function exit code */
9291  __Pyx_RefNannyFinishContext();
9292  return __pyx_r;
9293 }
9294 
9295 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9296  PyObject *__pyx_r = NULL;
9297  __Pyx_RefNannyDeclarations
9298  __Pyx_RefNannySetupContext("__get__", 0);
9299  __Pyx_XDECREF(__pyx_r);
9300  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9301  __pyx_r = ((PyObject *)__pyx_v_self->elementInnerDiametersArray);
9302  goto __pyx_L0;
9303 
9304  /* function exit code */
9305  __pyx_L0:;
9306  __Pyx_XGIVEREF(__pyx_r);
9307  __Pyx_RefNannyFinishContext();
9308  return __pyx_r;
9309 }
9310 
9311 /* Python wrapper */
9312 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9313 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9314  int __pyx_r;
9315  __Pyx_RefNannyDeclarations
9316  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9317  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9318 
9319  /* function exit code */
9320  __Pyx_RefNannyFinishContext();
9321  return __pyx_r;
9322 }
9323 
9324 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9325  int __pyx_r;
9326  __Pyx_RefNannyDeclarations
9327  PyObject *__pyx_t_1 = NULL;
9328  __Pyx_RefNannySetupContext("__set__", 0);
9329  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 80, __pyx_L1_error)
9330  __pyx_t_1 = __pyx_v_value;
9331  __Pyx_INCREF(__pyx_t_1);
9332  __Pyx_GIVEREF(__pyx_t_1);
9333  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
9334  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9335  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)__pyx_t_1);
9336  __pyx_t_1 = 0;
9337 
9338  /* function exit code */
9339  __pyx_r = 0;
9340  goto __pyx_L0;
9341  __pyx_L1_error:;
9342  __Pyx_XDECREF(__pyx_t_1);
9343  __Pyx_AddTraceback("cmeshTools.CMesh.elementInnerDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9344  __pyx_r = -1;
9345  __pyx_L0:;
9346  __Pyx_RefNannyFinishContext();
9347  return __pyx_r;
9348 }
9349 
9350 /* Python wrapper */
9351 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9352 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(PyObject *__pyx_v_self) {
9353  int __pyx_r;
9354  __Pyx_RefNannyDeclarations
9355  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9356  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9357 
9358  /* function exit code */
9359  __Pyx_RefNannyFinishContext();
9360  return __pyx_r;
9361 }
9362 
9363 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9364  int __pyx_r;
9365  __Pyx_RefNannyDeclarations
9366  __Pyx_RefNannySetupContext("__del__", 0);
9367  __Pyx_INCREF(Py_None);
9368  __Pyx_GIVEREF(Py_None);
9369  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
9370  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9371  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)Py_None);
9372 
9373  /* function exit code */
9374  __pyx_r = 0;
9375  __Pyx_RefNannyFinishContext();
9376  return __pyx_r;
9377 }
9378 
9379 /* "cmeshTools.pxd":81
9380  * cdef np.ndarray elementDiametersArray,
9381  * cdef np.ndarray elementInnerDiametersArray,
9382  * cdef np.ndarray elementBoundaryDiametersArray, # <<<<<<<<<<<<<<
9383  * cdef np.ndarray elementBarycentersArray,
9384  * cdef np.ndarray elementBoundaryBarycentersArray,
9385  */
9386 
9387 /* Python wrapper */
9388 static PyObject *__pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9389 static PyObject *__pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(PyObject *__pyx_v_self) {
9390  PyObject *__pyx_r = 0;
9391  __Pyx_RefNannyDeclarations
9392  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9393  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9394 
9395  /* function exit code */
9396  __Pyx_RefNannyFinishContext();
9397  return __pyx_r;
9398 }
9399 
9400 static PyObject *__pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9401  PyObject *__pyx_r = NULL;
9402  __Pyx_RefNannyDeclarations
9403  __Pyx_RefNannySetupContext("__get__", 0);
9404  __Pyx_XDECREF(__pyx_r);
9405  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9406  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryDiametersArray);
9407  goto __pyx_L0;
9408 
9409  /* function exit code */
9410  __pyx_L0:;
9411  __Pyx_XGIVEREF(__pyx_r);
9412  __Pyx_RefNannyFinishContext();
9413  return __pyx_r;
9414 }
9415 
9416 /* Python wrapper */
9417 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9418 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9419  int __pyx_r;
9420  __Pyx_RefNannyDeclarations
9421  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9422  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9423 
9424  /* function exit code */
9425  __Pyx_RefNannyFinishContext();
9426  return __pyx_r;
9427 }
9428 
9429 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9430  int __pyx_r;
9431  __Pyx_RefNannyDeclarations
9432  PyObject *__pyx_t_1 = NULL;
9433  __Pyx_RefNannySetupContext("__set__", 0);
9434  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 81, __pyx_L1_error)
9435  __pyx_t_1 = __pyx_v_value;
9436  __Pyx_INCREF(__pyx_t_1);
9437  __Pyx_GIVEREF(__pyx_t_1);
9438  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
9439  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9440  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)__pyx_t_1);
9441  __pyx_t_1 = 0;
9442 
9443  /* function exit code */
9444  __pyx_r = 0;
9445  goto __pyx_L0;
9446  __pyx_L1_error:;
9447  __Pyx_XDECREF(__pyx_t_1);
9448  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9449  __pyx_r = -1;
9450  __pyx_L0:;
9451  __Pyx_RefNannyFinishContext();
9452  return __pyx_r;
9453 }
9454 
9455 /* Python wrapper */
9456 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9457 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(PyObject *__pyx_v_self) {
9458  int __pyx_r;
9459  __Pyx_RefNannyDeclarations
9460  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9461  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9462 
9463  /* function exit code */
9464  __Pyx_RefNannyFinishContext();
9465  return __pyx_r;
9466 }
9467 
9468 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9469  int __pyx_r;
9470  __Pyx_RefNannyDeclarations
9471  __Pyx_RefNannySetupContext("__del__", 0);
9472  __Pyx_INCREF(Py_None);
9473  __Pyx_GIVEREF(Py_None);
9474  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
9475  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9476  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None);
9477 
9478  /* function exit code */
9479  __pyx_r = 0;
9480  __Pyx_RefNannyFinishContext();
9481  return __pyx_r;
9482 }
9483 
9484 /* "cmeshTools.pxd":82
9485  * cdef np.ndarray elementInnerDiametersArray,
9486  * cdef np.ndarray elementBoundaryDiametersArray,
9487  * cdef np.ndarray elementBarycentersArray, # <<<<<<<<<<<<<<
9488  * cdef np.ndarray elementBoundaryBarycentersArray,
9489  * cdef np.ndarray nodeDiametersArray,
9490  */
9491 
9492 /* Python wrapper */
9493 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9494 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(PyObject *__pyx_v_self) {
9495  PyObject *__pyx_r = 0;
9496  __Pyx_RefNannyDeclarations
9497  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9498  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9499 
9500  /* function exit code */
9501  __Pyx_RefNannyFinishContext();
9502  return __pyx_r;
9503 }
9504 
9505 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9506  PyObject *__pyx_r = NULL;
9507  __Pyx_RefNannyDeclarations
9508  __Pyx_RefNannySetupContext("__get__", 0);
9509  __Pyx_XDECREF(__pyx_r);
9510  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9511  __pyx_r = ((PyObject *)__pyx_v_self->elementBarycentersArray);
9512  goto __pyx_L0;
9513 
9514  /* function exit code */
9515  __pyx_L0:;
9516  __Pyx_XGIVEREF(__pyx_r);
9517  __Pyx_RefNannyFinishContext();
9518  return __pyx_r;
9519 }
9520 
9521 /* Python wrapper */
9522 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9523 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9524  int __pyx_r;
9525  __Pyx_RefNannyDeclarations
9526  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9527  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9528 
9529  /* function exit code */
9530  __Pyx_RefNannyFinishContext();
9531  return __pyx_r;
9532 }
9533 
9534 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9535  int __pyx_r;
9536  __Pyx_RefNannyDeclarations
9537  PyObject *__pyx_t_1 = NULL;
9538  __Pyx_RefNannySetupContext("__set__", 0);
9539  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 82, __pyx_L1_error)
9540  __pyx_t_1 = __pyx_v_value;
9541  __Pyx_INCREF(__pyx_t_1);
9542  __Pyx_GIVEREF(__pyx_t_1);
9543  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
9544  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9545  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)__pyx_t_1);
9546  __pyx_t_1 = 0;
9547 
9548  /* function exit code */
9549  __pyx_r = 0;
9550  goto __pyx_L0;
9551  __pyx_L1_error:;
9552  __Pyx_XDECREF(__pyx_t_1);
9553  __Pyx_AddTraceback("cmeshTools.CMesh.elementBarycentersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9554  __pyx_r = -1;
9555  __pyx_L0:;
9556  __Pyx_RefNannyFinishContext();
9557  return __pyx_r;
9558 }
9559 
9560 /* Python wrapper */
9561 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9562 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(PyObject *__pyx_v_self) {
9563  int __pyx_r;
9564  __Pyx_RefNannyDeclarations
9565  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9566  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9567 
9568  /* function exit code */
9569  __Pyx_RefNannyFinishContext();
9570  return __pyx_r;
9571 }
9572 
9573 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9574  int __pyx_r;
9575  __Pyx_RefNannyDeclarations
9576  __Pyx_RefNannySetupContext("__del__", 0);
9577  __Pyx_INCREF(Py_None);
9578  __Pyx_GIVEREF(Py_None);
9579  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
9580  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9581  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)Py_None);
9582 
9583  /* function exit code */
9584  __pyx_r = 0;
9585  __Pyx_RefNannyFinishContext();
9586  return __pyx_r;
9587 }
9588 
9589 /* "cmeshTools.pxd":83
9590  * cdef np.ndarray elementBoundaryDiametersArray,
9591  * cdef np.ndarray elementBarycentersArray,
9592  * cdef np.ndarray elementBoundaryBarycentersArray, # <<<<<<<<<<<<<<
9593  * cdef np.ndarray nodeDiametersArray,
9594  * cdef np.ndarray nodeSupportArray,
9595  */
9596 
9597 /* Python wrapper */
9598 static PyObject *__pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9599 static PyObject *__pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(PyObject *__pyx_v_self) {
9600  PyObject *__pyx_r = 0;
9601  __Pyx_RefNannyDeclarations
9602  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9603  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9604 
9605  /* function exit code */
9606  __Pyx_RefNannyFinishContext();
9607  return __pyx_r;
9608 }
9609 
9610 static PyObject *__pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9611  PyObject *__pyx_r = NULL;
9612  __Pyx_RefNannyDeclarations
9613  __Pyx_RefNannySetupContext("__get__", 0);
9614  __Pyx_XDECREF(__pyx_r);
9615  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9616  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray);
9617  goto __pyx_L0;
9618 
9619  /* function exit code */
9620  __pyx_L0:;
9621  __Pyx_XGIVEREF(__pyx_r);
9622  __Pyx_RefNannyFinishContext();
9623  return __pyx_r;
9624 }
9625 
9626 /* Python wrapper */
9627 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9628 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9629  int __pyx_r;
9630  __Pyx_RefNannyDeclarations
9631  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9632  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9633 
9634  /* function exit code */
9635  __Pyx_RefNannyFinishContext();
9636  return __pyx_r;
9637 }
9638 
9639 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9640  int __pyx_r;
9641  __Pyx_RefNannyDeclarations
9642  PyObject *__pyx_t_1 = NULL;
9643  __Pyx_RefNannySetupContext("__set__", 0);
9644  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 83, __pyx_L1_error)
9645  __pyx_t_1 = __pyx_v_value;
9646  __Pyx_INCREF(__pyx_t_1);
9647  __Pyx_GIVEREF(__pyx_t_1);
9648  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
9649  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9650  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)__pyx_t_1);
9651  __pyx_t_1 = 0;
9652 
9653  /* function exit code */
9654  __pyx_r = 0;
9655  goto __pyx_L0;
9656  __pyx_L1_error:;
9657  __Pyx_XDECREF(__pyx_t_1);
9658  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryBarycentersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9659  __pyx_r = -1;
9660  __pyx_L0:;
9661  __Pyx_RefNannyFinishContext();
9662  return __pyx_r;
9663 }
9664 
9665 /* Python wrapper */
9666 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9667 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(PyObject *__pyx_v_self) {
9668  int __pyx_r;
9669  __Pyx_RefNannyDeclarations
9670  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9671  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9672 
9673  /* function exit code */
9674  __Pyx_RefNannyFinishContext();
9675  return __pyx_r;
9676 }
9677 
9678 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9679  int __pyx_r;
9680  __Pyx_RefNannyDeclarations
9681  __Pyx_RefNannySetupContext("__del__", 0);
9682  __Pyx_INCREF(Py_None);
9683  __Pyx_GIVEREF(Py_None);
9684  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
9685  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9686  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None);
9687 
9688  /* function exit code */
9689  __pyx_r = 0;
9690  __Pyx_RefNannyFinishContext();
9691  return __pyx_r;
9692 }
9693 
9694 /* "cmeshTools.pxd":84
9695  * cdef np.ndarray elementBarycentersArray,
9696  * cdef np.ndarray elementBoundaryBarycentersArray,
9697  * cdef np.ndarray nodeDiametersArray, # <<<<<<<<<<<<<<
9698  * cdef np.ndarray nodeSupportArray,
9699  *
9700  */
9701 
9702 /* Python wrapper */
9703 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9704 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(PyObject *__pyx_v_self) {
9705  PyObject *__pyx_r = 0;
9706  __Pyx_RefNannyDeclarations
9707  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9708  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9709 
9710  /* function exit code */
9711  __Pyx_RefNannyFinishContext();
9712  return __pyx_r;
9713 }
9714 
9715 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9716  PyObject *__pyx_r = NULL;
9717  __Pyx_RefNannyDeclarations
9718  __Pyx_RefNannySetupContext("__get__", 0);
9719  __Pyx_XDECREF(__pyx_r);
9720  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
9721  __pyx_r = ((PyObject *)__pyx_v_self->nodeDiametersArray);
9722  goto __pyx_L0;
9723 
9724  /* function exit code */
9725  __pyx_L0:;
9726  __Pyx_XGIVEREF(__pyx_r);
9727  __Pyx_RefNannyFinishContext();
9728  return __pyx_r;
9729 }
9730 
9731 /* Python wrapper */
9732 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9733 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9734  int __pyx_r;
9735  __Pyx_RefNannyDeclarations
9736  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9737  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9738 
9739  /* function exit code */
9740  __Pyx_RefNannyFinishContext();
9741  return __pyx_r;
9742 }
9743 
9744 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9745  int __pyx_r;
9746  __Pyx_RefNannyDeclarations
9747  PyObject *__pyx_t_1 = NULL;
9748  __Pyx_RefNannySetupContext("__set__", 0);
9749  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 84, __pyx_L1_error)
9750  __pyx_t_1 = __pyx_v_value;
9751  __Pyx_INCREF(__pyx_t_1);
9752  __Pyx_GIVEREF(__pyx_t_1);
9753  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
9754  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
9755  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)__pyx_t_1);
9756  __pyx_t_1 = 0;
9757 
9758  /* function exit code */
9759  __pyx_r = 0;
9760  goto __pyx_L0;
9761  __pyx_L1_error:;
9762  __Pyx_XDECREF(__pyx_t_1);
9763  __Pyx_AddTraceback("cmeshTools.CMesh.nodeDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9764  __pyx_r = -1;
9765  __pyx_L0:;
9766  __Pyx_RefNannyFinishContext();
9767  return __pyx_r;
9768 }
9769 
9770 /* Python wrapper */
9771 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9772 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(PyObject *__pyx_v_self) {
9773  int __pyx_r;
9774  __Pyx_RefNannyDeclarations
9775  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9776  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9777 
9778  /* function exit code */
9779  __Pyx_RefNannyFinishContext();
9780  return __pyx_r;
9781 }
9782 
9783 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9784  int __pyx_r;
9785  __Pyx_RefNannyDeclarations
9786  __Pyx_RefNannySetupContext("__del__", 0);
9787  __Pyx_INCREF(Py_None);
9788  __Pyx_GIVEREF(Py_None);
9789  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
9790  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
9791  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)Py_None);
9792 
9793  /* function exit code */
9794  __pyx_r = 0;
9795  __Pyx_RefNannyFinishContext();
9796  return __pyx_r;
9797 }
9798 
9799 /* "cmeshTools.pxd":85
9800  * cdef np.ndarray elementBoundaryBarycentersArray,
9801  * cdef np.ndarray nodeDiametersArray,
9802  * cdef np.ndarray nodeSupportArray, # <<<<<<<<<<<<<<
9803  *
9804  * cdef double h,
9805  */
9806 
9807 /* Python wrapper */
9808 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9809 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(PyObject *__pyx_v_self) {
9810  PyObject *__pyx_r = 0;
9811  __Pyx_RefNannyDeclarations
9812  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9813  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9814 
9815  /* function exit code */
9816  __Pyx_RefNannyFinishContext();
9817  return __pyx_r;
9818 }
9819 
9820 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9821  PyObject *__pyx_r = NULL;
9822  __Pyx_RefNannyDeclarations
9823  __Pyx_RefNannySetupContext("__get__", 0);
9824  __Pyx_XDECREF(__pyx_r);
9825  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeSupportArray));
9826  __pyx_r = ((PyObject *)__pyx_v_self->nodeSupportArray);
9827  goto __pyx_L0;
9828 
9829  /* function exit code */
9830  __pyx_L0:;
9831  __Pyx_XGIVEREF(__pyx_r);
9832  __Pyx_RefNannyFinishContext();
9833  return __pyx_r;
9834 }
9835 
9836 /* Python wrapper */
9837 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9838 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9839  int __pyx_r;
9840  __Pyx_RefNannyDeclarations
9841  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9842  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9843 
9844  /* function exit code */
9845  __Pyx_RefNannyFinishContext();
9846  return __pyx_r;
9847 }
9848 
9849 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9850  int __pyx_r;
9851  __Pyx_RefNannyDeclarations
9852  PyObject *__pyx_t_1 = NULL;
9853  __Pyx_RefNannySetupContext("__set__", 0);
9854  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 85, __pyx_L1_error)
9855  __pyx_t_1 = __pyx_v_value;
9856  __Pyx_INCREF(__pyx_t_1);
9857  __Pyx_GIVEREF(__pyx_t_1);
9858  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
9859  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
9860  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)__pyx_t_1);
9861  __pyx_t_1 = 0;
9862 
9863  /* function exit code */
9864  __pyx_r = 0;
9865  goto __pyx_L0;
9866  __pyx_L1_error:;
9867  __Pyx_XDECREF(__pyx_t_1);
9868  __Pyx_AddTraceback("cmeshTools.CMesh.nodeSupportArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9869  __pyx_r = -1;
9870  __pyx_L0:;
9871  __Pyx_RefNannyFinishContext();
9872  return __pyx_r;
9873 }
9874 
9875 /* Python wrapper */
9876 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9877 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(PyObject *__pyx_v_self) {
9878  int __pyx_r;
9879  __Pyx_RefNannyDeclarations
9880  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9881  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9882 
9883  /* function exit code */
9884  __Pyx_RefNannyFinishContext();
9885  return __pyx_r;
9886 }
9887 
9888 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9889  int __pyx_r;
9890  __Pyx_RefNannyDeclarations
9891  __Pyx_RefNannySetupContext("__del__", 0);
9892  __Pyx_INCREF(Py_None);
9893  __Pyx_GIVEREF(Py_None);
9894  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
9895  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
9896  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)Py_None);
9897 
9898  /* function exit code */
9899  __pyx_r = 0;
9900  __Pyx_RefNannyFinishContext();
9901  return __pyx_r;
9902 }
9903 
9904 /* "cmeshTools.pxd":87
9905  * cdef np.ndarray nodeSupportArray,
9906  *
9907  * cdef double h, # <<<<<<<<<<<<<<
9908  * cdef double hMin,
9909  * cdef double sigmaMax,
9910  */
9911 
9912 /* Python wrapper */
9913 static PyObject *__pyx_pw_10cmeshTools_5CMesh_1h_1__get__(PyObject *__pyx_v_self); /*proto*/
9914 static PyObject *__pyx_pw_10cmeshTools_5CMesh_1h_1__get__(PyObject *__pyx_v_self) {
9915  PyObject *__pyx_r = 0;
9916  __Pyx_RefNannyDeclarations
9917  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9918  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_1h___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9919 
9920  /* function exit code */
9921  __Pyx_RefNannyFinishContext();
9922  return __pyx_r;
9923 }
9924 
9925 static PyObject *__pyx_pf_10cmeshTools_5CMesh_1h___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9926  PyObject *__pyx_r = NULL;
9927  __Pyx_RefNannyDeclarations
9928  PyObject *__pyx_t_1 = NULL;
9929  __Pyx_RefNannySetupContext("__get__", 0);
9930  __Pyx_XDECREF(__pyx_r);
9931  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->h); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 87, __pyx_L1_error)
9932  __Pyx_GOTREF(__pyx_t_1);
9933  __pyx_r = __pyx_t_1;
9934  __pyx_t_1 = 0;
9935  goto __pyx_L0;
9936 
9937  /* function exit code */
9938  __pyx_L1_error:;
9939  __Pyx_XDECREF(__pyx_t_1);
9940  __Pyx_AddTraceback("cmeshTools.CMesh.h.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9941  __pyx_r = NULL;
9942  __pyx_L0:;
9943  __Pyx_XGIVEREF(__pyx_r);
9944  __Pyx_RefNannyFinishContext();
9945  return __pyx_r;
9946 }
9947 
9948 /* Python wrapper */
9949 static int __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9950 static int __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9951  int __pyx_r;
9952  __Pyx_RefNannyDeclarations
9953  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9954  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9955 
9956  /* function exit code */
9957  __Pyx_RefNannyFinishContext();
9958  return __pyx_r;
9959 }
9960 
9961 static int __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9962  int __pyx_r;
9963  __Pyx_RefNannyDeclarations
9964  double __pyx_t_1;
9965  __Pyx_RefNannySetupContext("__set__", 0);
9966  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 87, __pyx_L1_error)
9967  __pyx_v_self->h = __pyx_t_1;
9968 
9969  /* function exit code */
9970  __pyx_r = 0;
9971  goto __pyx_L0;
9972  __pyx_L1_error:;
9973  __Pyx_AddTraceback("cmeshTools.CMesh.h.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9974  __pyx_r = -1;
9975  __pyx_L0:;
9976  __Pyx_RefNannyFinishContext();
9977  return __pyx_r;
9978 }
9979 
9980 /* "cmeshTools.pxd":88
9981  *
9982  * cdef double h,
9983  * cdef double hMin, # <<<<<<<<<<<<<<
9984  * cdef double sigmaMax,
9985  * cdef double volume
9986  */
9987 
9988 /* Python wrapper */
9989 static PyObject *__pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(PyObject *__pyx_v_self); /*proto*/
9990 static PyObject *__pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(PyObject *__pyx_v_self) {
9991  PyObject *__pyx_r = 0;
9992  __Pyx_RefNannyDeclarations
9993  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9994  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4hMin___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9995 
9996  /* function exit code */
9997  __Pyx_RefNannyFinishContext();
9998  return __pyx_r;
9999 }
10000 
10001 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4hMin___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10002  PyObject *__pyx_r = NULL;
10003  __Pyx_RefNannyDeclarations
10004  PyObject *__pyx_t_1 = NULL;
10005  __Pyx_RefNannySetupContext("__get__", 0);
10006  __Pyx_XDECREF(__pyx_r);
10007  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->hMin); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 88, __pyx_L1_error)
10008  __Pyx_GOTREF(__pyx_t_1);
10009  __pyx_r = __pyx_t_1;
10010  __pyx_t_1 = 0;
10011  goto __pyx_L0;
10012 
10013  /* function exit code */
10014  __pyx_L1_error:;
10015  __Pyx_XDECREF(__pyx_t_1);
10016  __Pyx_AddTraceback("cmeshTools.CMesh.hMin.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10017  __pyx_r = NULL;
10018  __pyx_L0:;
10019  __Pyx_XGIVEREF(__pyx_r);
10020  __Pyx_RefNannyFinishContext();
10021  return __pyx_r;
10022 }
10023 
10024 /* Python wrapper */
10025 static int __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10026 static int __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10027  int __pyx_r;
10028  __Pyx_RefNannyDeclarations
10029  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10030  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10031 
10032  /* function exit code */
10033  __Pyx_RefNannyFinishContext();
10034  return __pyx_r;
10035 }
10036 
10037 static int __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10038  int __pyx_r;
10039  __Pyx_RefNannyDeclarations
10040  double __pyx_t_1;
10041  __Pyx_RefNannySetupContext("__set__", 0);
10042  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L1_error)
10043  __pyx_v_self->hMin = __pyx_t_1;
10044 
10045  /* function exit code */
10046  __pyx_r = 0;
10047  goto __pyx_L0;
10048  __pyx_L1_error:;
10049  __Pyx_AddTraceback("cmeshTools.CMesh.hMin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10050  __pyx_r = -1;
10051  __pyx_L0:;
10052  __Pyx_RefNannyFinishContext();
10053  return __pyx_r;
10054 }
10055 
10056 /* "cmeshTools.pxd":89
10057  * cdef double h,
10058  * cdef double hMin,
10059  * cdef double sigmaMax, # <<<<<<<<<<<<<<
10060  * cdef double volume
10061  */
10062 
10063 /* Python wrapper */
10064 static PyObject *__pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(PyObject *__pyx_v_self); /*proto*/
10065 static PyObject *__pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(PyObject *__pyx_v_self) {
10066  PyObject *__pyx_r = 0;
10067  __Pyx_RefNannyDeclarations
10068  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10069  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10070 
10071  /* function exit code */
10072  __Pyx_RefNannyFinishContext();
10073  return __pyx_r;
10074 }
10075 
10076 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10077  PyObject *__pyx_r = NULL;
10078  __Pyx_RefNannyDeclarations
10079  PyObject *__pyx_t_1 = NULL;
10080  __Pyx_RefNannySetupContext("__get__", 0);
10081  __Pyx_XDECREF(__pyx_r);
10082  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sigmaMax); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 89, __pyx_L1_error)
10083  __Pyx_GOTREF(__pyx_t_1);
10084  __pyx_r = __pyx_t_1;
10085  __pyx_t_1 = 0;
10086  goto __pyx_L0;
10087 
10088  /* function exit code */
10089  __pyx_L1_error:;
10090  __Pyx_XDECREF(__pyx_t_1);
10091  __Pyx_AddTraceback("cmeshTools.CMesh.sigmaMax.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10092  __pyx_r = NULL;
10093  __pyx_L0:;
10094  __Pyx_XGIVEREF(__pyx_r);
10095  __Pyx_RefNannyFinishContext();
10096  return __pyx_r;
10097 }
10098 
10099 /* Python wrapper */
10100 static int __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10101 static int __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10102  int __pyx_r;
10103  __Pyx_RefNannyDeclarations
10104  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10105  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10106 
10107  /* function exit code */
10108  __Pyx_RefNannyFinishContext();
10109  return __pyx_r;
10110 }
10111 
10112 static int __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10113  int __pyx_r;
10114  __Pyx_RefNannyDeclarations
10115  double __pyx_t_1;
10116  __Pyx_RefNannySetupContext("__set__", 0);
10117  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 89, __pyx_L1_error)
10118  __pyx_v_self->sigmaMax = __pyx_t_1;
10119 
10120  /* function exit code */
10121  __pyx_r = 0;
10122  goto __pyx_L0;
10123  __pyx_L1_error:;
10124  __Pyx_AddTraceback("cmeshTools.CMesh.sigmaMax.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10125  __pyx_r = -1;
10126  __pyx_L0:;
10127  __Pyx_RefNannyFinishContext();
10128  return __pyx_r;
10129 }
10130 
10131 /* "cmeshTools.pxd":90
10132  * cdef double hMin,
10133  * cdef double sigmaMax,
10134  * cdef double volume # <<<<<<<<<<<<<<
10135  */
10136 
10137 /* Python wrapper */
10138 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(PyObject *__pyx_v_self); /*proto*/
10139 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(PyObject *__pyx_v_self) {
10140  PyObject *__pyx_r = 0;
10141  __Pyx_RefNannyDeclarations
10142  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10143  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6volume___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10144 
10145  /* function exit code */
10146  __Pyx_RefNannyFinishContext();
10147  return __pyx_r;
10148 }
10149 
10150 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6volume___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10151  PyObject *__pyx_r = NULL;
10152  __Pyx_RefNannyDeclarations
10153  PyObject *__pyx_t_1 = NULL;
10154  __Pyx_RefNannySetupContext("__get__", 0);
10155  __Pyx_XDECREF(__pyx_r);
10156  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->volume); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 90, __pyx_L1_error)
10157  __Pyx_GOTREF(__pyx_t_1);
10158  __pyx_r = __pyx_t_1;
10159  __pyx_t_1 = 0;
10160  goto __pyx_L0;
10161 
10162  /* function exit code */
10163  __pyx_L1_error:;
10164  __Pyx_XDECREF(__pyx_t_1);
10165  __Pyx_AddTraceback("cmeshTools.CMesh.volume.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10166  __pyx_r = NULL;
10167  __pyx_L0:;
10168  __Pyx_XGIVEREF(__pyx_r);
10169  __Pyx_RefNannyFinishContext();
10170  return __pyx_r;
10171 }
10172 
10173 /* Python wrapper */
10174 static int __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10175 static int __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10176  int __pyx_r;
10177  __Pyx_RefNannyDeclarations
10178  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10179  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10180 
10181  /* function exit code */
10182  __Pyx_RefNannyFinishContext();
10183  return __pyx_r;
10184 }
10185 
10186 static int __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10187  int __pyx_r;
10188  __Pyx_RefNannyDeclarations
10189  double __pyx_t_1;
10190  __Pyx_RefNannySetupContext("__set__", 0);
10191  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 90, __pyx_L1_error)
10192  __pyx_v_self->volume = __pyx_t_1;
10193 
10194  /* function exit code */
10195  __pyx_r = 0;
10196  goto __pyx_L0;
10197  __pyx_L1_error:;
10198  __Pyx_AddTraceback("cmeshTools.CMesh.volume.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10199  __pyx_r = -1;
10200  __pyx_L0:;
10201  __Pyx_RefNannyFinishContext();
10202  return __pyx_r;
10203 }
10204 
10205 /* "(tree fragment)":1
10206  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10207  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10208  * def __setstate_cython__(self, __pyx_state):
10209  */
10210 
10211 /* Python wrapper */
10212 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10213 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10214  PyObject *__pyx_r = 0;
10215  __Pyx_RefNannyDeclarations
10216  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10217  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6__reduce_cython__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10218 
10219  /* function exit code */
10220  __Pyx_RefNannyFinishContext();
10221  return __pyx_r;
10222 }
10223 
10224 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10225  PyObject *__pyx_r = NULL;
10226  __Pyx_RefNannyDeclarations
10227  PyObject *__pyx_t_1 = NULL;
10228  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10229 
10230  /* "(tree fragment)":2
10231  * def __reduce_cython__(self):
10232  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
10233  * def __setstate_cython__(self, __pyx_state):
10234  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10235  */
10236  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
10237  __Pyx_GOTREF(__pyx_t_1);
10238  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10239  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10240  __PYX_ERR(0, 2, __pyx_L1_error)
10241 
10242  /* "(tree fragment)":1
10243  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10244  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10245  * def __setstate_cython__(self, __pyx_state):
10246  */
10247 
10248  /* function exit code */
10249  __pyx_L1_error:;
10250  __Pyx_XDECREF(__pyx_t_1);
10251  __Pyx_AddTraceback("cmeshTools.CMesh.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10252  __pyx_r = NULL;
10253  __Pyx_XGIVEREF(__pyx_r);
10254  __Pyx_RefNannyFinishContext();
10255  return __pyx_r;
10256 }
10257 
10258 /* "(tree fragment)":3
10259  * def __reduce_cython__(self):
10260  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10261  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10262  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10263  */
10264 
10265 /* Python wrapper */
10266 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
10267 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10268  PyObject *__pyx_r = 0;
10269  __Pyx_RefNannyDeclarations
10270  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10271  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8__setstate_cython__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10272 
10273  /* function exit code */
10274  __Pyx_RefNannyFinishContext();
10275  return __pyx_r;
10276 }
10277 
10278 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
10279  PyObject *__pyx_r = NULL;
10280  __Pyx_RefNannyDeclarations
10281  PyObject *__pyx_t_1 = NULL;
10282  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10283 
10284  /* "(tree fragment)":4
10285  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10286  * def __setstate_cython__(self, __pyx_state):
10287  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
10288  */
10289  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
10290  __Pyx_GOTREF(__pyx_t_1);
10291  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10292  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10293  __PYX_ERR(0, 4, __pyx_L1_error)
10294 
10295  /* "(tree fragment)":3
10296  * def __reduce_cython__(self):
10297  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10298  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10299  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10300  */
10301 
10302  /* function exit code */
10303  __pyx_L1_error:;
10304  __Pyx_XDECREF(__pyx_t_1);
10305  __Pyx_AddTraceback("cmeshTools.CMesh.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10306  __pyx_r = NULL;
10307  __Pyx_XGIVEREF(__pyx_r);
10308  __Pyx_RefNannyFinishContext();
10309  return __pyx_r;
10310 }
10311 
10312 /* "cmeshTools.pyx":117
10313  * self.volume = self.mesh.volume
10314  *
10315  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
10316  * """
10317  * function to be conform to old module, and to calls from MeshTools
10318  */
10319 
10320 /* Python wrapper */
10321 static PyObject *__pyx_pw_10cmeshTools_1buildPythonMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
10322 static char __pyx_doc_10cmeshTools_buildPythonMeshInterface[] = "\n function to be conform to old module, and to calls from MeshTools\n ";
10323 static PyMethodDef __pyx_mdef_10cmeshTools_1buildPythonMeshInterface = {"buildPythonMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_1buildPythonMeshInterface, METH_O, __pyx_doc_10cmeshTools_buildPythonMeshInterface};
10324 static PyObject *__pyx_pw_10cmeshTools_1buildPythonMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
10325  PyObject *__pyx_r = 0;
10326  __Pyx_RefNannyDeclarations
10327  __Pyx_RefNannySetupContext("buildPythonMeshInterface (wrapper)", 0);
10328  __pyx_r = __pyx_pf_10cmeshTools_buildPythonMeshInterface(__pyx_self, ((PyObject *)__pyx_v_cmesh));
10329 
10330  /* function exit code */
10331  __Pyx_RefNannyFinishContext();
10332  return __pyx_r;
10333 }
10334 
10335 static PyObject *__pyx_pf_10cmeshTools_buildPythonMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
10336  PyObject *__pyx_r = NULL;
10337  __Pyx_RefNannyDeclarations
10338  PyObject *__pyx_t_1 = NULL;
10339  PyObject *__pyx_t_2 = NULL;
10340  PyObject *__pyx_t_3 = NULL;
10341  PyObject *__pyx_t_4 = NULL;
10342  PyObject *__pyx_t_5 = NULL;
10343  PyObject *__pyx_t_6 = NULL;
10344  PyObject *__pyx_t_7 = NULL;
10345  PyObject *__pyx_t_8 = NULL;
10346  PyObject *__pyx_t_9 = NULL;
10347  PyObject *__pyx_t_10 = NULL;
10348  PyObject *__pyx_t_11 = NULL;
10349  PyObject *__pyx_t_12 = NULL;
10350  PyObject *__pyx_t_13 = NULL;
10351  PyObject *__pyx_t_14 = NULL;
10352  PyObject *__pyx_t_15 = NULL;
10353  PyObject *__pyx_t_16 = NULL;
10354  PyObject *__pyx_t_17 = NULL;
10355  PyObject *__pyx_t_18 = NULL;
10356  PyObject *__pyx_t_19 = NULL;
10357  PyObject *__pyx_t_20 = NULL;
10358  PyObject *__pyx_t_21 = NULL;
10359  PyObject *__pyx_t_22 = NULL;
10360  PyObject *__pyx_t_23 = NULL;
10361  PyObject *__pyx_t_24 = NULL;
10362  PyObject *__pyx_t_25 = NULL;
10363  PyObject *__pyx_t_26 = NULL;
10364  PyObject *__pyx_t_27 = NULL;
10365  PyObject *__pyx_t_28 = NULL;
10366  PyObject *__pyx_t_29 = NULL;
10367  PyObject *__pyx_t_30 = NULL;
10368  PyObject *__pyx_t_31 = NULL;
10369  PyObject *__pyx_t_32 = NULL;
10370  PyObject *__pyx_t_33 = NULL;
10371  PyObject *__pyx_t_34 = NULL;
10372  PyObject *__pyx_t_35 = NULL;
10373  PyObject *__pyx_t_36 = NULL;
10374  PyObject *__pyx_t_37 = NULL;
10375  PyObject *__pyx_t_38 = NULL;
10376  PyObject *__pyx_t_39 = NULL;
10377  PyObject *__pyx_t_40 = NULL;
10378  PyObject *__pyx_t_41 = NULL;
10379  PyObject *__pyx_t_42 = NULL;
10380  PyObject *__pyx_t_43 = NULL;
10381  PyObject *__pyx_t_44 = NULL;
10382  PyObject *__pyx_t_45 = NULL;
10383  PyObject *__pyx_t_46 = NULL;
10384  PyObject *__pyx_t_47 = NULL;
10385  PyObject *__pyx_t_48 = NULL;
10386  PyObject *__pyx_t_49 = NULL;
10387  PyObject *__pyx_t_50 = NULL;
10388  PyObject *__pyx_t_51 = NULL;
10389  __Pyx_RefNannySetupContext("buildPythonMeshInterface", 0);
10390 
10391  /* "cmeshTools.pyx":121
10392  * function to be conform to old module, and to calls from MeshTools
10393  * """
10394  * cmesh.buildPythonMeshInterface() # <<<<<<<<<<<<<<
10395  * return (cmesh.nElements_global,
10396  * cmesh.nNodes_global,
10397  */
10398  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_buildPythonMeshInterface); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 121, __pyx_L1_error)
10399  __Pyx_GOTREF(__pyx_t_2);
10400  __pyx_t_3 = NULL;
10401  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10402  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10403  if (likely(__pyx_t_3)) {
10404  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10405  __Pyx_INCREF(__pyx_t_3);
10406  __Pyx_INCREF(function);
10407  __Pyx_DECREF_SET(__pyx_t_2, function);
10408  }
10409  }
10410  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
10411  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10412  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 121, __pyx_L1_error)
10413  __Pyx_GOTREF(__pyx_t_1);
10414  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10415  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10416 
10417  /* "cmeshTools.pyx":122
10418  * """
10419  * cmesh.buildPythonMeshInterface()
10420  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
10421  * cmesh.nNodes_global,
10422  * cmesh.nNodes_element,
10423  */
10424  __Pyx_XDECREF(__pyx_r);
10425  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 122, __pyx_L1_error)
10426  __Pyx_GOTREF(__pyx_t_1);
10427 
10428  /* "cmeshTools.pyx":123
10429  * cmesh.buildPythonMeshInterface()
10430  * return (cmesh.nElements_global,
10431  * cmesh.nNodes_global, # <<<<<<<<<<<<<<
10432  * cmesh.nNodes_element,
10433  * cmesh.nNodes_elementBoundary,
10434  */
10435  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 123, __pyx_L1_error)
10436  __Pyx_GOTREF(__pyx_t_2);
10437 
10438  /* "cmeshTools.pyx":124
10439  * return (cmesh.nElements_global,
10440  * cmesh.nNodes_global,
10441  * cmesh.nNodes_element, # <<<<<<<<<<<<<<
10442  * cmesh.nNodes_elementBoundary,
10443  * cmesh.nElementBoundaries_element,
10444  */
10445  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 124, __pyx_L1_error)
10446  __Pyx_GOTREF(__pyx_t_3);
10447 
10448  /* "cmeshTools.pyx":125
10449  * cmesh.nNodes_global,
10450  * cmesh.nNodes_element,
10451  * cmesh.nNodes_elementBoundary, # <<<<<<<<<<<<<<
10452  * cmesh.nElementBoundaries_element,
10453  * cmesh.nElementBoundaries_global,
10454  */
10455  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 125, __pyx_L1_error)
10456  __Pyx_GOTREF(__pyx_t_4);
10457 
10458  /* "cmeshTools.pyx":126
10459  * cmesh.nNodes_element,
10460  * cmesh.nNodes_elementBoundary,
10461  * cmesh.nElementBoundaries_element, # <<<<<<<<<<<<<<
10462  * cmesh.nElementBoundaries_global,
10463  * cmesh.nInteriorElementBoundaries_global,
10464  */
10465  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 126, __pyx_L1_error)
10466  __Pyx_GOTREF(__pyx_t_5);
10467 
10468  /* "cmeshTools.pyx":127
10469  * cmesh.nNodes_elementBoundary,
10470  * cmesh.nElementBoundaries_element,
10471  * cmesh.nElementBoundaries_global, # <<<<<<<<<<<<<<
10472  * cmesh.nInteriorElementBoundaries_global,
10473  * cmesh.nExteriorElementBoundaries_global,
10474  */
10475  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 127, __pyx_L1_error)
10476  __Pyx_GOTREF(__pyx_t_6);
10477 
10478  /* "cmeshTools.pyx":128
10479  * cmesh.nElementBoundaries_element,
10480  * cmesh.nElementBoundaries_global,
10481  * cmesh.nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
10482  * cmesh.nExteriorElementBoundaries_global,
10483  * cmesh.max_nElements_node,
10484  */
10485  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nInteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 128, __pyx_L1_error)
10486  __Pyx_GOTREF(__pyx_t_7);
10487 
10488  /* "cmeshTools.pyx":129
10489  * cmesh.nElementBoundaries_global,
10490  * cmesh.nInteriorElementBoundaries_global,
10491  * cmesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
10492  * cmesh.max_nElements_node,
10493  * cmesh.nEdges_global,
10494  */
10495  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 129, __pyx_L1_error)
10496  __Pyx_GOTREF(__pyx_t_8);
10497 
10498  /* "cmeshTools.pyx":130
10499  * cmesh.nInteriorElementBoundaries_global,
10500  * cmesh.nExteriorElementBoundaries_global,
10501  * cmesh.max_nElements_node, # <<<<<<<<<<<<<<
10502  * cmesh.nEdges_global,
10503  * cmesh.max_nNodeNeighbors_node,
10504  */
10505  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nElements_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 130, __pyx_L1_error)
10506  __Pyx_GOTREF(__pyx_t_9);
10507 
10508  /* "cmeshTools.pyx":131
10509  * cmesh.nExteriorElementBoundaries_global,
10510  * cmesh.max_nElements_node,
10511  * cmesh.nEdges_global, # <<<<<<<<<<<<<<
10512  * cmesh.max_nNodeNeighbors_node,
10513  * cmesh.elementNodesArray,
10514  */
10515  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nEdges_global); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 131, __pyx_L1_error)
10516  __Pyx_GOTREF(__pyx_t_10);
10517 
10518  /* "cmeshTools.pyx":132
10519  * cmesh.max_nElements_node,
10520  * cmesh.nEdges_global,
10521  * cmesh.max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
10522  * cmesh.elementNodesArray,
10523  * cmesh.nodeElementsArray,
10524  */
10525  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nNodeNeighbors_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 132, __pyx_L1_error)
10526  __Pyx_GOTREF(__pyx_t_11);
10527 
10528  /* "cmeshTools.pyx":133
10529  * cmesh.nEdges_global,
10530  * cmesh.max_nNodeNeighbors_node,
10531  * cmesh.elementNodesArray, # <<<<<<<<<<<<<<
10532  * cmesh.nodeElementsArray,
10533  * cmesh.nodeElementOffsets,
10534  */
10535  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 133, __pyx_L1_error)
10536  __Pyx_GOTREF(__pyx_t_12);
10537 
10538  /* "cmeshTools.pyx":134
10539  * cmesh.max_nNodeNeighbors_node,
10540  * cmesh.elementNodesArray,
10541  * cmesh.nodeElementsArray, # <<<<<<<<<<<<<<
10542  * cmesh.nodeElementOffsets,
10543  * cmesh.elementNeighborsArray,
10544  */
10545  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeElementsArray); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 134, __pyx_L1_error)
10546  __Pyx_GOTREF(__pyx_t_13);
10547 
10548  /* "cmeshTools.pyx":135
10549  * cmesh.elementNodesArray,
10550  * cmesh.nodeElementsArray,
10551  * cmesh.nodeElementOffsets, # <<<<<<<<<<<<<<
10552  * cmesh.elementNeighborsArray,
10553  * cmesh.elementBoundariesArray,
10554  */
10555  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 135, __pyx_L1_error)
10556  __Pyx_GOTREF(__pyx_t_14);
10557 
10558  /* "cmeshTools.pyx":136
10559  * cmesh.nodeElementsArray,
10560  * cmesh.nodeElementOffsets,
10561  * cmesh.elementNeighborsArray, # <<<<<<<<<<<<<<
10562  * cmesh.elementBoundariesArray,
10563  * cmesh.elementBoundaryNodesArray,
10564  */
10565  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementNeighborsArray); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 136, __pyx_L1_error)
10566  __Pyx_GOTREF(__pyx_t_15);
10567 
10568  /* "cmeshTools.pyx":137
10569  * cmesh.nodeElementOffsets,
10570  * cmesh.elementNeighborsArray,
10571  * cmesh.elementBoundariesArray, # <<<<<<<<<<<<<<
10572  * cmesh.elementBoundaryNodesArray,
10573  * cmesh.elementBoundaryElementsArray,
10574  */
10575  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundariesArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 137, __pyx_L1_error)
10576  __Pyx_GOTREF(__pyx_t_16);
10577 
10578  /* "cmeshTools.pyx":138
10579  * cmesh.elementNeighborsArray,
10580  * cmesh.elementBoundariesArray,
10581  * cmesh.elementBoundaryNodesArray, # <<<<<<<<<<<<<<
10582  * cmesh.elementBoundaryElementsArray,
10583  * cmesh.elementBoundaryLocalElementBoundariesArray,
10584  */
10585  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryNodesArray); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 138, __pyx_L1_error)
10586  __Pyx_GOTREF(__pyx_t_17);
10587 
10588  /* "cmeshTools.pyx":139
10589  * cmesh.elementBoundariesArray,
10590  * cmesh.elementBoundaryNodesArray,
10591  * cmesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
10592  * cmesh.elementBoundaryLocalElementBoundariesArray,
10593  * cmesh.interiorElementBoundariesArray,
10594  */
10595  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 139, __pyx_L1_error)
10596  __Pyx_GOTREF(__pyx_t_18);
10597 
10598  /* "cmeshTools.pyx":140
10599  * cmesh.elementBoundaryNodesArray,
10600  * cmesh.elementBoundaryElementsArray,
10601  * cmesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
10602  * cmesh.interiorElementBoundariesArray,
10603  * cmesh.exteriorElementBoundariesArray,
10604  */
10605  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 140, __pyx_L1_error)
10606  __Pyx_GOTREF(__pyx_t_19);
10607 
10608  /* "cmeshTools.pyx":141
10609  * cmesh.elementBoundaryElementsArray,
10610  * cmesh.elementBoundaryLocalElementBoundariesArray,
10611  * cmesh.interiorElementBoundariesArray, # <<<<<<<<<<<<<<
10612  * cmesh.exteriorElementBoundariesArray,
10613  * cmesh.edgeNodesArray,
10614  */
10615  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_interiorElementBoundariesArray); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 141, __pyx_L1_error)
10616  __Pyx_GOTREF(__pyx_t_20);
10617 
10618  /* "cmeshTools.pyx":142
10619  * cmesh.elementBoundaryLocalElementBoundariesArray,
10620  * cmesh.interiorElementBoundariesArray,
10621  * cmesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
10622  * cmesh.edgeNodesArray,
10623  * cmesh.nodeStarArray,
10624  */
10625  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 142, __pyx_L1_error)
10626  __Pyx_GOTREF(__pyx_t_21);
10627 
10628  /* "cmeshTools.pyx":143
10629  * cmesh.interiorElementBoundariesArray,
10630  * cmesh.exteriorElementBoundariesArray,
10631  * cmesh.edgeNodesArray, # <<<<<<<<<<<<<<
10632  * cmesh.nodeStarArray,
10633  * cmesh.nodeStarOffsets,
10634  */
10635  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_edgeNodesArray); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 143, __pyx_L1_error)
10636  __Pyx_GOTREF(__pyx_t_22);
10637 
10638  /* "cmeshTools.pyx":144
10639  * cmesh.exteriorElementBoundariesArray,
10640  * cmesh.edgeNodesArray,
10641  * cmesh.nodeStarArray, # <<<<<<<<<<<<<<
10642  * cmesh.nodeStarOffsets,
10643  * cmesh.elementMaterialTypes,
10644  */
10645  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeStarArray); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 144, __pyx_L1_error)
10646  __Pyx_GOTREF(__pyx_t_23);
10647 
10648  /* "cmeshTools.pyx":145
10649  * cmesh.edgeNodesArray,
10650  * cmesh.nodeStarArray,
10651  * cmesh.nodeStarOffsets, # <<<<<<<<<<<<<<
10652  * cmesh.elementMaterialTypes,
10653  * cmesh.elementBoundaryMaterialTypes,
10654  */
10655  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeStarOffsets); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 145, __pyx_L1_error)
10656  __Pyx_GOTREF(__pyx_t_24);
10657 
10658  /* "cmeshTools.pyx":146
10659  * cmesh.nodeStarArray,
10660  * cmesh.nodeStarOffsets,
10661  * cmesh.elementMaterialTypes, # <<<<<<<<<<<<<<
10662  * cmesh.elementBoundaryMaterialTypes,
10663  * cmesh.nodeMaterialTypes,
10664  */
10665  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementMaterialTypes); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 146, __pyx_L1_error)
10666  __Pyx_GOTREF(__pyx_t_25);
10667 
10668  /* "cmeshTools.pyx":147
10669  * cmesh.nodeStarOffsets,
10670  * cmesh.elementMaterialTypes,
10671  * cmesh.elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
10672  * cmesh.nodeMaterialTypes,
10673  * cmesh.nodeArray,
10674  */
10675  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryMaterialTypes); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 147, __pyx_L1_error)
10676  __Pyx_GOTREF(__pyx_t_26);
10677 
10678  /* "cmeshTools.pyx":148
10679  * cmesh.elementMaterialTypes,
10680  * cmesh.elementBoundaryMaterialTypes,
10681  * cmesh.nodeMaterialTypes, # <<<<<<<<<<<<<<
10682  * cmesh.nodeArray,
10683  * cmesh.nx,
10684  */
10685  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeMaterialTypes); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 148, __pyx_L1_error)
10686  __Pyx_GOTREF(__pyx_t_27);
10687 
10688  /* "cmeshTools.pyx":149
10689  * cmesh.elementBoundaryMaterialTypes,
10690  * cmesh.nodeMaterialTypes,
10691  * cmesh.nodeArray, # <<<<<<<<<<<<<<
10692  * cmesh.nx,
10693  * cmesh.ny,
10694  */
10695  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 149, __pyx_L1_error)
10696  __Pyx_GOTREF(__pyx_t_28);
10697 
10698  /* "cmeshTools.pyx":150
10699  * cmesh.nodeMaterialTypes,
10700  * cmesh.nodeArray,
10701  * cmesh.nx, # <<<<<<<<<<<<<<
10702  * cmesh.ny,
10703  * cmesh.nz,
10704  */
10705  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nx); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 150, __pyx_L1_error)
10706  __Pyx_GOTREF(__pyx_t_29);
10707 
10708  /* "cmeshTools.pyx":151
10709  * cmesh.nodeArray,
10710  * cmesh.nx,
10711  * cmesh.ny, # <<<<<<<<<<<<<<
10712  * cmesh.nz,
10713  * cmesh.px,
10714  */
10715  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_ny); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 151, __pyx_L1_error)
10716  __Pyx_GOTREF(__pyx_t_30);
10717 
10718  /* "cmeshTools.pyx":152
10719  * cmesh.nx,
10720  * cmesh.ny,
10721  * cmesh.nz, # <<<<<<<<<<<<<<
10722  * cmesh.px,
10723  * cmesh.py,
10724  */
10725  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nz); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 152, __pyx_L1_error)
10726  __Pyx_GOTREF(__pyx_t_31);
10727 
10728  /* "cmeshTools.pyx":153
10729  * cmesh.ny,
10730  * cmesh.nz,
10731  * cmesh.px, # <<<<<<<<<<<<<<
10732  * cmesh.py,
10733  * cmesh.pz,
10734  */
10735  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_px); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 153, __pyx_L1_error)
10736  __Pyx_GOTREF(__pyx_t_32);
10737 
10738  /* "cmeshTools.pyx":154
10739  * cmesh.nz,
10740  * cmesh.px,
10741  * cmesh.py, # <<<<<<<<<<<<<<
10742  * cmesh.pz,
10743  * cmesh.elementIJK,
10744  */
10745  __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_py); if (unlikely(!__pyx_t_33)) __PYX_ERR(1, 154, __pyx_L1_error)
10746  __Pyx_GOTREF(__pyx_t_33);
10747 
10748  /* "cmeshTools.pyx":155
10749  * cmesh.px,
10750  * cmesh.py,
10751  * cmesh.pz, # <<<<<<<<<<<<<<
10752  * cmesh.elementIJK,
10753  * cmesh.weights,
10754  */
10755  __pyx_t_34 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_pz); if (unlikely(!__pyx_t_34)) __PYX_ERR(1, 155, __pyx_L1_error)
10756  __Pyx_GOTREF(__pyx_t_34);
10757 
10758  /* "cmeshTools.pyx":156
10759  * cmesh.py,
10760  * cmesh.pz,
10761  * cmesh.elementIJK, # <<<<<<<<<<<<<<
10762  * cmesh.weights,
10763  * cmesh.U_KNOT,
10764  */
10765  __pyx_t_35 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementIJK); if (unlikely(!__pyx_t_35)) __PYX_ERR(1, 156, __pyx_L1_error)
10766  __Pyx_GOTREF(__pyx_t_35);
10767 
10768  /* "cmeshTools.pyx":157
10769  * cmesh.pz,
10770  * cmesh.elementIJK,
10771  * cmesh.weights, # <<<<<<<<<<<<<<
10772  * cmesh.U_KNOT,
10773  * cmesh.V_KNOT,
10774  */
10775  __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_weights); if (unlikely(!__pyx_t_36)) __PYX_ERR(1, 157, __pyx_L1_error)
10776  __Pyx_GOTREF(__pyx_t_36);
10777 
10778  /* "cmeshTools.pyx":158
10779  * cmesh.elementIJK,
10780  * cmesh.weights,
10781  * cmesh.U_KNOT, # <<<<<<<<<<<<<<
10782  * cmesh.V_KNOT,
10783  * cmesh.W_KNOT,
10784  */
10785  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_U_KNOT); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 158, __pyx_L1_error)
10786  __Pyx_GOTREF(__pyx_t_37);
10787 
10788  /* "cmeshTools.pyx":159
10789  * cmesh.weights,
10790  * cmesh.U_KNOT,
10791  * cmesh.V_KNOT, # <<<<<<<<<<<<<<
10792  * cmesh.W_KNOT,
10793  * cmesh.elementDiametersArray,
10794  */
10795  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_V_KNOT); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 159, __pyx_L1_error)
10796  __Pyx_GOTREF(__pyx_t_38);
10797 
10798  /* "cmeshTools.pyx":160
10799  * cmesh.U_KNOT,
10800  * cmesh.V_KNOT,
10801  * cmesh.W_KNOT, # <<<<<<<<<<<<<<
10802  * cmesh.elementDiametersArray,
10803  * cmesh.elementInnerDiametersArray,
10804  */
10805  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_W_KNOT); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 160, __pyx_L1_error)
10806  __Pyx_GOTREF(__pyx_t_39);
10807 
10808  /* "cmeshTools.pyx":161
10809  * cmesh.V_KNOT,
10810  * cmesh.W_KNOT,
10811  * cmesh.elementDiametersArray, # <<<<<<<<<<<<<<
10812  * cmesh.elementInnerDiametersArray,
10813  * cmesh.elementBoundaryDiametersArray,
10814  */
10815  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 161, __pyx_L1_error)
10816  __Pyx_GOTREF(__pyx_t_40);
10817 
10818  /* "cmeshTools.pyx":162
10819  * cmesh.W_KNOT,
10820  * cmesh.elementDiametersArray,
10821  * cmesh.elementInnerDiametersArray, # <<<<<<<<<<<<<<
10822  * cmesh.elementBoundaryDiametersArray,
10823  * cmesh.elementBarycentersArray,
10824  */
10825  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementInnerDiametersArray); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 162, __pyx_L1_error)
10826  __Pyx_GOTREF(__pyx_t_41);
10827 
10828  /* "cmeshTools.pyx":163
10829  * cmesh.elementDiametersArray,
10830  * cmesh.elementInnerDiametersArray,
10831  * cmesh.elementBoundaryDiametersArray, # <<<<<<<<<<<<<<
10832  * cmesh.elementBarycentersArray,
10833  * cmesh.elementBoundaryBarycentersArray,
10834  */
10835  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 163, __pyx_L1_error)
10836  __Pyx_GOTREF(__pyx_t_42);
10837 
10838  /* "cmeshTools.pyx":164
10839  * cmesh.elementInnerDiametersArray,
10840  * cmesh.elementBoundaryDiametersArray,
10841  * cmesh.elementBarycentersArray, # <<<<<<<<<<<<<<
10842  * cmesh.elementBoundaryBarycentersArray,
10843  * cmesh.nodeDiametersArray,
10844  */
10845  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBarycentersArray); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 164, __pyx_L1_error)
10846  __Pyx_GOTREF(__pyx_t_43);
10847 
10848  /* "cmeshTools.pyx":165
10849  * cmesh.elementBoundaryDiametersArray,
10850  * cmesh.elementBarycentersArray,
10851  * cmesh.elementBoundaryBarycentersArray, # <<<<<<<<<<<<<<
10852  * cmesh.nodeDiametersArray,
10853  * cmesh.nodeSupportArray,
10854  */
10855  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryBarycentersArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(1, 165, __pyx_L1_error)
10856  __Pyx_GOTREF(__pyx_t_44);
10857 
10858  /* "cmeshTools.pyx":166
10859  * cmesh.elementBarycentersArray,
10860  * cmesh.elementBoundaryBarycentersArray,
10861  * cmesh.nodeDiametersArray, # <<<<<<<<<<<<<<
10862  * cmesh.nodeSupportArray,
10863  * cmesh.h,
10864  */
10865  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeDiametersArray); if (unlikely(!__pyx_t_45)) __PYX_ERR(1, 166, __pyx_L1_error)
10866  __Pyx_GOTREF(__pyx_t_45);
10867 
10868  /* "cmeshTools.pyx":167
10869  * cmesh.elementBoundaryBarycentersArray,
10870  * cmesh.nodeDiametersArray,
10871  * cmesh.nodeSupportArray, # <<<<<<<<<<<<<<
10872  * cmesh.h,
10873  * cmesh.hMin,
10874  */
10875  __pyx_t_46 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeSupportArray); if (unlikely(!__pyx_t_46)) __PYX_ERR(1, 167, __pyx_L1_error)
10876  __Pyx_GOTREF(__pyx_t_46);
10877 
10878  /* "cmeshTools.pyx":168
10879  * cmesh.nodeDiametersArray,
10880  * cmesh.nodeSupportArray,
10881  * cmesh.h, # <<<<<<<<<<<<<<
10882  * cmesh.hMin,
10883  * cmesh.sigmaMax,
10884  */
10885  __pyx_t_47 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_h); if (unlikely(!__pyx_t_47)) __PYX_ERR(1, 168, __pyx_L1_error)
10886  __Pyx_GOTREF(__pyx_t_47);
10887 
10888  /* "cmeshTools.pyx":169
10889  * cmesh.nodeSupportArray,
10890  * cmesh.h,
10891  * cmesh.hMin, # <<<<<<<<<<<<<<
10892  * cmesh.sigmaMax,
10893  * cmesh.volume)
10894  */
10895  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_hMin); if (unlikely(!__pyx_t_48)) __PYX_ERR(1, 169, __pyx_L1_error)
10896  __Pyx_GOTREF(__pyx_t_48);
10897 
10898  /* "cmeshTools.pyx":170
10899  * cmesh.h,
10900  * cmesh.hMin,
10901  * cmesh.sigmaMax, # <<<<<<<<<<<<<<
10902  * cmesh.volume)
10903  *
10904  */
10905  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_sigmaMax); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 170, __pyx_L1_error)
10906  __Pyx_GOTREF(__pyx_t_49);
10907 
10908  /* "cmeshTools.pyx":171
10909  * cmesh.hMin,
10910  * cmesh.sigmaMax,
10911  * cmesh.volume) # <<<<<<<<<<<<<<
10912  *
10913  * def buildPythonMeshInterfaceNoArrays(cmesh):
10914  */
10915  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_volume); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 171, __pyx_L1_error)
10916  __Pyx_GOTREF(__pyx_t_50);
10917 
10918  /* "cmeshTools.pyx":122
10919  * """
10920  * cmesh.buildPythonMeshInterface()
10921  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
10922  * cmesh.nNodes_global,
10923  * cmesh.nNodes_element,
10924  */
10925  __pyx_t_51 = PyTuple_New(50); if (unlikely(!__pyx_t_51)) __PYX_ERR(1, 122, __pyx_L1_error)
10926  __Pyx_GOTREF(__pyx_t_51);
10927  __Pyx_GIVEREF(__pyx_t_1);
10928  PyTuple_SET_ITEM(__pyx_t_51, 0, __pyx_t_1);
10929  __Pyx_GIVEREF(__pyx_t_2);
10930  PyTuple_SET_ITEM(__pyx_t_51, 1, __pyx_t_2);
10931  __Pyx_GIVEREF(__pyx_t_3);
10932  PyTuple_SET_ITEM(__pyx_t_51, 2, __pyx_t_3);
10933  __Pyx_GIVEREF(__pyx_t_4);
10934  PyTuple_SET_ITEM(__pyx_t_51, 3, __pyx_t_4);
10935  __Pyx_GIVEREF(__pyx_t_5);
10936  PyTuple_SET_ITEM(__pyx_t_51, 4, __pyx_t_5);
10937  __Pyx_GIVEREF(__pyx_t_6);
10938  PyTuple_SET_ITEM(__pyx_t_51, 5, __pyx_t_6);
10939  __Pyx_GIVEREF(__pyx_t_7);
10940  PyTuple_SET_ITEM(__pyx_t_51, 6, __pyx_t_7);
10941  __Pyx_GIVEREF(__pyx_t_8);
10942  PyTuple_SET_ITEM(__pyx_t_51, 7, __pyx_t_8);
10943  __Pyx_GIVEREF(__pyx_t_9);
10944  PyTuple_SET_ITEM(__pyx_t_51, 8, __pyx_t_9);
10945  __Pyx_GIVEREF(__pyx_t_10);
10946  PyTuple_SET_ITEM(__pyx_t_51, 9, __pyx_t_10);
10947  __Pyx_GIVEREF(__pyx_t_11);
10948  PyTuple_SET_ITEM(__pyx_t_51, 10, __pyx_t_11);
10949  __Pyx_GIVEREF(__pyx_t_12);
10950  PyTuple_SET_ITEM(__pyx_t_51, 11, __pyx_t_12);
10951  __Pyx_GIVEREF(__pyx_t_13);
10952  PyTuple_SET_ITEM(__pyx_t_51, 12, __pyx_t_13);
10953  __Pyx_GIVEREF(__pyx_t_14);
10954  PyTuple_SET_ITEM(__pyx_t_51, 13, __pyx_t_14);
10955  __Pyx_GIVEREF(__pyx_t_15);
10956  PyTuple_SET_ITEM(__pyx_t_51, 14, __pyx_t_15);
10957  __Pyx_GIVEREF(__pyx_t_16);
10958  PyTuple_SET_ITEM(__pyx_t_51, 15, __pyx_t_16);
10959  __Pyx_GIVEREF(__pyx_t_17);
10960  PyTuple_SET_ITEM(__pyx_t_51, 16, __pyx_t_17);
10961  __Pyx_GIVEREF(__pyx_t_18);
10962  PyTuple_SET_ITEM(__pyx_t_51, 17, __pyx_t_18);
10963  __Pyx_GIVEREF(__pyx_t_19);
10964  PyTuple_SET_ITEM(__pyx_t_51, 18, __pyx_t_19);
10965  __Pyx_GIVEREF(__pyx_t_20);
10966  PyTuple_SET_ITEM(__pyx_t_51, 19, __pyx_t_20);
10967  __Pyx_GIVEREF(__pyx_t_21);
10968  PyTuple_SET_ITEM(__pyx_t_51, 20, __pyx_t_21);
10969  __Pyx_GIVEREF(__pyx_t_22);
10970  PyTuple_SET_ITEM(__pyx_t_51, 21, __pyx_t_22);
10971  __Pyx_GIVEREF(__pyx_t_23);
10972  PyTuple_SET_ITEM(__pyx_t_51, 22, __pyx_t_23);
10973  __Pyx_GIVEREF(__pyx_t_24);
10974  PyTuple_SET_ITEM(__pyx_t_51, 23, __pyx_t_24);
10975  __Pyx_GIVEREF(__pyx_t_25);
10976  PyTuple_SET_ITEM(__pyx_t_51, 24, __pyx_t_25);
10977  __Pyx_GIVEREF(__pyx_t_26);
10978  PyTuple_SET_ITEM(__pyx_t_51, 25, __pyx_t_26);
10979  __Pyx_GIVEREF(__pyx_t_27);
10980  PyTuple_SET_ITEM(__pyx_t_51, 26, __pyx_t_27);
10981  __Pyx_GIVEREF(__pyx_t_28);
10982  PyTuple_SET_ITEM(__pyx_t_51, 27, __pyx_t_28);
10983  __Pyx_GIVEREF(__pyx_t_29);
10984  PyTuple_SET_ITEM(__pyx_t_51, 28, __pyx_t_29);
10985  __Pyx_GIVEREF(__pyx_t_30);
10986  PyTuple_SET_ITEM(__pyx_t_51, 29, __pyx_t_30);
10987  __Pyx_GIVEREF(__pyx_t_31);
10988  PyTuple_SET_ITEM(__pyx_t_51, 30, __pyx_t_31);
10989  __Pyx_GIVEREF(__pyx_t_32);
10990  PyTuple_SET_ITEM(__pyx_t_51, 31, __pyx_t_32);
10991  __Pyx_GIVEREF(__pyx_t_33);
10992  PyTuple_SET_ITEM(__pyx_t_51, 32, __pyx_t_33);
10993  __Pyx_GIVEREF(__pyx_t_34);
10994  PyTuple_SET_ITEM(__pyx_t_51, 33, __pyx_t_34);
10995  __Pyx_GIVEREF(__pyx_t_35);
10996  PyTuple_SET_ITEM(__pyx_t_51, 34, __pyx_t_35);
10997  __Pyx_GIVEREF(__pyx_t_36);
10998  PyTuple_SET_ITEM(__pyx_t_51, 35, __pyx_t_36);
10999  __Pyx_GIVEREF(__pyx_t_37);
11000  PyTuple_SET_ITEM(__pyx_t_51, 36, __pyx_t_37);
11001  __Pyx_GIVEREF(__pyx_t_38);
11002  PyTuple_SET_ITEM(__pyx_t_51, 37, __pyx_t_38);
11003  __Pyx_GIVEREF(__pyx_t_39);
11004  PyTuple_SET_ITEM(__pyx_t_51, 38, __pyx_t_39);
11005  __Pyx_GIVEREF(__pyx_t_40);
11006  PyTuple_SET_ITEM(__pyx_t_51, 39, __pyx_t_40);
11007  __Pyx_GIVEREF(__pyx_t_41);
11008  PyTuple_SET_ITEM(__pyx_t_51, 40, __pyx_t_41);
11009  __Pyx_GIVEREF(__pyx_t_42);
11010  PyTuple_SET_ITEM(__pyx_t_51, 41, __pyx_t_42);
11011  __Pyx_GIVEREF(__pyx_t_43);
11012  PyTuple_SET_ITEM(__pyx_t_51, 42, __pyx_t_43);
11013  __Pyx_GIVEREF(__pyx_t_44);
11014  PyTuple_SET_ITEM(__pyx_t_51, 43, __pyx_t_44);
11015  __Pyx_GIVEREF(__pyx_t_45);
11016  PyTuple_SET_ITEM(__pyx_t_51, 44, __pyx_t_45);
11017  __Pyx_GIVEREF(__pyx_t_46);
11018  PyTuple_SET_ITEM(__pyx_t_51, 45, __pyx_t_46);
11019  __Pyx_GIVEREF(__pyx_t_47);
11020  PyTuple_SET_ITEM(__pyx_t_51, 46, __pyx_t_47);
11021  __Pyx_GIVEREF(__pyx_t_48);
11022  PyTuple_SET_ITEM(__pyx_t_51, 47, __pyx_t_48);
11023  __Pyx_GIVEREF(__pyx_t_49);
11024  PyTuple_SET_ITEM(__pyx_t_51, 48, __pyx_t_49);
11025  __Pyx_GIVEREF(__pyx_t_50);
11026  PyTuple_SET_ITEM(__pyx_t_51, 49, __pyx_t_50);
11027  __pyx_t_1 = 0;
11028  __pyx_t_2 = 0;
11029  __pyx_t_3 = 0;
11030  __pyx_t_4 = 0;
11031  __pyx_t_5 = 0;
11032  __pyx_t_6 = 0;
11033  __pyx_t_7 = 0;
11034  __pyx_t_8 = 0;
11035  __pyx_t_9 = 0;
11036  __pyx_t_10 = 0;
11037  __pyx_t_11 = 0;
11038  __pyx_t_12 = 0;
11039  __pyx_t_13 = 0;
11040  __pyx_t_14 = 0;
11041  __pyx_t_15 = 0;
11042  __pyx_t_16 = 0;
11043  __pyx_t_17 = 0;
11044  __pyx_t_18 = 0;
11045  __pyx_t_19 = 0;
11046  __pyx_t_20 = 0;
11047  __pyx_t_21 = 0;
11048  __pyx_t_22 = 0;
11049  __pyx_t_23 = 0;
11050  __pyx_t_24 = 0;
11051  __pyx_t_25 = 0;
11052  __pyx_t_26 = 0;
11053  __pyx_t_27 = 0;
11054  __pyx_t_28 = 0;
11055  __pyx_t_29 = 0;
11056  __pyx_t_30 = 0;
11057  __pyx_t_31 = 0;
11058  __pyx_t_32 = 0;
11059  __pyx_t_33 = 0;
11060  __pyx_t_34 = 0;
11061  __pyx_t_35 = 0;
11062  __pyx_t_36 = 0;
11063  __pyx_t_37 = 0;
11064  __pyx_t_38 = 0;
11065  __pyx_t_39 = 0;
11066  __pyx_t_40 = 0;
11067  __pyx_t_41 = 0;
11068  __pyx_t_42 = 0;
11069  __pyx_t_43 = 0;
11070  __pyx_t_44 = 0;
11071  __pyx_t_45 = 0;
11072  __pyx_t_46 = 0;
11073  __pyx_t_47 = 0;
11074  __pyx_t_48 = 0;
11075  __pyx_t_49 = 0;
11076  __pyx_t_50 = 0;
11077  __pyx_r = __pyx_t_51;
11078  __pyx_t_51 = 0;
11079  goto __pyx_L0;
11080 
11081  /* "cmeshTools.pyx":117
11082  * self.volume = self.mesh.volume
11083  *
11084  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
11085  * """
11086  * function to be conform to old module, and to calls from MeshTools
11087  */
11088 
11089  /* function exit code */
11090  __pyx_L1_error:;
11091  __Pyx_XDECREF(__pyx_t_1);
11092  __Pyx_XDECREF(__pyx_t_2);
11093  __Pyx_XDECREF(__pyx_t_3);
11094  __Pyx_XDECREF(__pyx_t_4);
11095  __Pyx_XDECREF(__pyx_t_5);
11096  __Pyx_XDECREF(__pyx_t_6);
11097  __Pyx_XDECREF(__pyx_t_7);
11098  __Pyx_XDECREF(__pyx_t_8);
11099  __Pyx_XDECREF(__pyx_t_9);
11100  __Pyx_XDECREF(__pyx_t_10);
11101  __Pyx_XDECREF(__pyx_t_11);
11102  __Pyx_XDECREF(__pyx_t_12);
11103  __Pyx_XDECREF(__pyx_t_13);
11104  __Pyx_XDECREF(__pyx_t_14);
11105  __Pyx_XDECREF(__pyx_t_15);
11106  __Pyx_XDECREF(__pyx_t_16);
11107  __Pyx_XDECREF(__pyx_t_17);
11108  __Pyx_XDECREF(__pyx_t_18);
11109  __Pyx_XDECREF(__pyx_t_19);
11110  __Pyx_XDECREF(__pyx_t_20);
11111  __Pyx_XDECREF(__pyx_t_21);
11112  __Pyx_XDECREF(__pyx_t_22);
11113  __Pyx_XDECREF(__pyx_t_23);
11114  __Pyx_XDECREF(__pyx_t_24);
11115  __Pyx_XDECREF(__pyx_t_25);
11116  __Pyx_XDECREF(__pyx_t_26);
11117  __Pyx_XDECREF(__pyx_t_27);
11118  __Pyx_XDECREF(__pyx_t_28);
11119  __Pyx_XDECREF(__pyx_t_29);
11120  __Pyx_XDECREF(__pyx_t_30);
11121  __Pyx_XDECREF(__pyx_t_31);
11122  __Pyx_XDECREF(__pyx_t_32);
11123  __Pyx_XDECREF(__pyx_t_33);
11124  __Pyx_XDECREF(__pyx_t_34);
11125  __Pyx_XDECREF(__pyx_t_35);
11126  __Pyx_XDECREF(__pyx_t_36);
11127  __Pyx_XDECREF(__pyx_t_37);
11128  __Pyx_XDECREF(__pyx_t_38);
11129  __Pyx_XDECREF(__pyx_t_39);
11130  __Pyx_XDECREF(__pyx_t_40);
11131  __Pyx_XDECREF(__pyx_t_41);
11132  __Pyx_XDECREF(__pyx_t_42);
11133  __Pyx_XDECREF(__pyx_t_43);
11134  __Pyx_XDECREF(__pyx_t_44);
11135  __Pyx_XDECREF(__pyx_t_45);
11136  __Pyx_XDECREF(__pyx_t_46);
11137  __Pyx_XDECREF(__pyx_t_47);
11138  __Pyx_XDECREF(__pyx_t_48);
11139  __Pyx_XDECREF(__pyx_t_49);
11140  __Pyx_XDECREF(__pyx_t_50);
11141  __Pyx_XDECREF(__pyx_t_51);
11142  __Pyx_AddTraceback("cmeshTools.buildPythonMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
11143  __pyx_r = NULL;
11144  __pyx_L0:;
11145  __Pyx_XGIVEREF(__pyx_r);
11146  __Pyx_RefNannyFinishContext();
11147  return __pyx_r;
11148 }
11149 
11150 /* "cmeshTools.pyx":173
11151  * cmesh.volume)
11152  *
11153  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
11154  * """
11155  * function to be conform to old module, and to calls from MeshTools
11156  */
11157 
11158 /* Python wrapper */
11159 static PyObject *__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
11160 static char __pyx_doc_10cmeshTools_2buildPythonMeshInterfaceNoArrays[] = "\n function to be conform to old module, and to calls from MeshTools\n ";
11161 static PyMethodDef __pyx_mdef_10cmeshTools_3buildPythonMeshInterfaceNoArrays = {"buildPythonMeshInterfaceNoArrays", (PyCFunction)__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays, METH_O, __pyx_doc_10cmeshTools_2buildPythonMeshInterfaceNoArrays};
11162 static PyObject *__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
11163  PyObject *__pyx_r = 0;
11164  __Pyx_RefNannyDeclarations
11165  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays (wrapper)", 0);
11166  __pyx_r = __pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(__pyx_self, ((PyObject *)__pyx_v_cmesh));
11167 
11168  /* function exit code */
11169  __Pyx_RefNannyFinishContext();
11170  return __pyx_r;
11171 }
11172 
11173 static PyObject *__pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
11174  PyObject *__pyx_r = NULL;
11175  __Pyx_RefNannyDeclarations
11176  PyObject *__pyx_t_1 = NULL;
11177  PyObject *__pyx_t_2 = NULL;
11178  PyObject *__pyx_t_3 = NULL;
11179  PyObject *__pyx_t_4 = NULL;
11180  PyObject *__pyx_t_5 = NULL;
11181  PyObject *__pyx_t_6 = NULL;
11182  PyObject *__pyx_t_7 = NULL;
11183  PyObject *__pyx_t_8 = NULL;
11184  PyObject *__pyx_t_9 = NULL;
11185  PyObject *__pyx_t_10 = NULL;
11186  PyObject *__pyx_t_11 = NULL;
11187  PyObject *__pyx_t_12 = NULL;
11188  PyObject *__pyx_t_13 = NULL;
11189  PyObject *__pyx_t_14 = NULL;
11190  PyObject *__pyx_t_15 = NULL;
11191  PyObject *__pyx_t_16 = NULL;
11192  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays", 0);
11193 
11194  /* "cmeshTools.pyx":177
11195  * function to be conform to old module, and to calls from MeshTools
11196  * """
11197  * cmesh.buildPythonMeshInterfaceNoArrays() # <<<<<<<<<<<<<<
11198  * return (cmesh.nElements_global,
11199  * cmesh.nNodes_global,
11200  */
11201  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_buildPythonMeshInterfaceNoArrays); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 177, __pyx_L1_error)
11202  __Pyx_GOTREF(__pyx_t_2);
11203  __pyx_t_3 = NULL;
11204  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11205  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11206  if (likely(__pyx_t_3)) {
11207  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11208  __Pyx_INCREF(__pyx_t_3);
11209  __Pyx_INCREF(function);
11210  __Pyx_DECREF_SET(__pyx_t_2, function);
11211  }
11212  }
11213  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
11214  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11215  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 177, __pyx_L1_error)
11216  __Pyx_GOTREF(__pyx_t_1);
11217  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11218  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11219 
11220  /* "cmeshTools.pyx":178
11221  * """
11222  * cmesh.buildPythonMeshInterfaceNoArrays()
11223  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
11224  * cmesh.nNodes_global,
11225  * cmesh.nNodes_element,
11226  */
11227  __Pyx_XDECREF(__pyx_r);
11228  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 178, __pyx_L1_error)
11229  __Pyx_GOTREF(__pyx_t_1);
11230 
11231  /* "cmeshTools.pyx":179
11232  * cmesh.buildPythonMeshInterfaceNoArrays()
11233  * return (cmesh.nElements_global,
11234  * cmesh.nNodes_global, # <<<<<<<<<<<<<<
11235  * cmesh.nNodes_element,
11236  * cmesh.nNodes_elementBoundary,
11237  */
11238  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 179, __pyx_L1_error)
11239  __Pyx_GOTREF(__pyx_t_2);
11240 
11241  /* "cmeshTools.pyx":180
11242  * return (cmesh.nElements_global,
11243  * cmesh.nNodes_global,
11244  * cmesh.nNodes_element, # <<<<<<<<<<<<<<
11245  * cmesh.nNodes_elementBoundary,
11246  * cmesh.nElementBoundaries_element,
11247  */
11248  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 180, __pyx_L1_error)
11249  __Pyx_GOTREF(__pyx_t_3);
11250 
11251  /* "cmeshTools.pyx":181
11252  * cmesh.nNodes_global,
11253  * cmesh.nNodes_element,
11254  * cmesh.nNodes_elementBoundary, # <<<<<<<<<<<<<<
11255  * cmesh.nElementBoundaries_element,
11256  * cmesh.nElementBoundaries_global,
11257  */
11258  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 181, __pyx_L1_error)
11259  __Pyx_GOTREF(__pyx_t_4);
11260 
11261  /* "cmeshTools.pyx":182
11262  * cmesh.nNodes_element,
11263  * cmesh.nNodes_elementBoundary,
11264  * cmesh.nElementBoundaries_element, # <<<<<<<<<<<<<<
11265  * cmesh.nElementBoundaries_global,
11266  * cmesh.nInteriorElementBoundaries_global,
11267  */
11268  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 182, __pyx_L1_error)
11269  __Pyx_GOTREF(__pyx_t_5);
11270 
11271  /* "cmeshTools.pyx":183
11272  * cmesh.nNodes_elementBoundary,
11273  * cmesh.nElementBoundaries_element,
11274  * cmesh.nElementBoundaries_global, # <<<<<<<<<<<<<<
11275  * cmesh.nInteriorElementBoundaries_global,
11276  * cmesh.nExteriorElementBoundaries_global,
11277  */
11278  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 183, __pyx_L1_error)
11279  __Pyx_GOTREF(__pyx_t_6);
11280 
11281  /* "cmeshTools.pyx":184
11282  * cmesh.nElementBoundaries_element,
11283  * cmesh.nElementBoundaries_global,
11284  * cmesh.nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
11285  * cmesh.nExteriorElementBoundaries_global,
11286  * cmesh.max_nElements_node,
11287  */
11288  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nInteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 184, __pyx_L1_error)
11289  __Pyx_GOTREF(__pyx_t_7);
11290 
11291  /* "cmeshTools.pyx":185
11292  * cmesh.nElementBoundaries_global,
11293  * cmesh.nInteriorElementBoundaries_global,
11294  * cmesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
11295  * cmesh.max_nElements_node,
11296  * cmesh.nEdges_global,
11297  */
11298  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 185, __pyx_L1_error)
11299  __Pyx_GOTREF(__pyx_t_8);
11300 
11301  /* "cmeshTools.pyx":186
11302  * cmesh.nInteriorElementBoundaries_global,
11303  * cmesh.nExteriorElementBoundaries_global,
11304  * cmesh.max_nElements_node, # <<<<<<<<<<<<<<
11305  * cmesh.nEdges_global,
11306  * cmesh.max_nNodeNeighbors_node,
11307  */
11308  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nElements_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 186, __pyx_L1_error)
11309  __Pyx_GOTREF(__pyx_t_9);
11310 
11311  /* "cmeshTools.pyx":187
11312  * cmesh.nExteriorElementBoundaries_global,
11313  * cmesh.max_nElements_node,
11314  * cmesh.nEdges_global, # <<<<<<<<<<<<<<
11315  * cmesh.max_nNodeNeighbors_node,
11316  * cmesh.h,
11317  */
11318  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nEdges_global); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 187, __pyx_L1_error)
11319  __Pyx_GOTREF(__pyx_t_10);
11320 
11321  /* "cmeshTools.pyx":188
11322  * cmesh.max_nElements_node,
11323  * cmesh.nEdges_global,
11324  * cmesh.max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
11325  * cmesh.h,
11326  * cmesh.hMin,
11327  */
11328  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nNodeNeighbors_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 188, __pyx_L1_error)
11329  __Pyx_GOTREF(__pyx_t_11);
11330 
11331  /* "cmeshTools.pyx":189
11332  * cmesh.nEdges_global,
11333  * cmesh.max_nNodeNeighbors_node,
11334  * cmesh.h, # <<<<<<<<<<<<<<
11335  * cmesh.hMin,
11336  * cmesh.sigmaMax,
11337  */
11338  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_h); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 189, __pyx_L1_error)
11339  __Pyx_GOTREF(__pyx_t_12);
11340 
11341  /* "cmeshTools.pyx":190
11342  * cmesh.max_nNodeNeighbors_node,
11343  * cmesh.h,
11344  * cmesh.hMin, # <<<<<<<<<<<<<<
11345  * cmesh.sigmaMax,
11346  * cmesh.volume)
11347  */
11348  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_hMin); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 190, __pyx_L1_error)
11349  __Pyx_GOTREF(__pyx_t_13);
11350 
11351  /* "cmeshTools.pyx":191
11352  * cmesh.h,
11353  * cmesh.hMin,
11354  * cmesh.sigmaMax, # <<<<<<<<<<<<<<
11355  * cmesh.volume)
11356  *
11357  */
11358  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_sigmaMax); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 191, __pyx_L1_error)
11359  __Pyx_GOTREF(__pyx_t_14);
11360 
11361  /* "cmeshTools.pyx":192
11362  * cmesh.hMin,
11363  * cmesh.sigmaMax,
11364  * cmesh.volume) # <<<<<<<<<<<<<<
11365  *
11366  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11367  */
11368  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_volume); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 192, __pyx_L1_error)
11369  __Pyx_GOTREF(__pyx_t_15);
11370 
11371  /* "cmeshTools.pyx":178
11372  * """
11373  * cmesh.buildPythonMeshInterfaceNoArrays()
11374  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
11375  * cmesh.nNodes_global,
11376  * cmesh.nNodes_element,
11377  */
11378  __pyx_t_16 = PyTuple_New(15); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 178, __pyx_L1_error)
11379  __Pyx_GOTREF(__pyx_t_16);
11380  __Pyx_GIVEREF(__pyx_t_1);
11381  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
11382  __Pyx_GIVEREF(__pyx_t_2);
11383  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_2);
11384  __Pyx_GIVEREF(__pyx_t_3);
11385  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_3);
11386  __Pyx_GIVEREF(__pyx_t_4);
11387  PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_4);
11388  __Pyx_GIVEREF(__pyx_t_5);
11389  PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_5);
11390  __Pyx_GIVEREF(__pyx_t_6);
11391  PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_6);
11392  __Pyx_GIVEREF(__pyx_t_7);
11393  PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_7);
11394  __Pyx_GIVEREF(__pyx_t_8);
11395  PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_8);
11396  __Pyx_GIVEREF(__pyx_t_9);
11397  PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_t_9);
11398  __Pyx_GIVEREF(__pyx_t_10);
11399  PyTuple_SET_ITEM(__pyx_t_16, 9, __pyx_t_10);
11400  __Pyx_GIVEREF(__pyx_t_11);
11401  PyTuple_SET_ITEM(__pyx_t_16, 10, __pyx_t_11);
11402  __Pyx_GIVEREF(__pyx_t_12);
11403  PyTuple_SET_ITEM(__pyx_t_16, 11, __pyx_t_12);
11404  __Pyx_GIVEREF(__pyx_t_13);
11405  PyTuple_SET_ITEM(__pyx_t_16, 12, __pyx_t_13);
11406  __Pyx_GIVEREF(__pyx_t_14);
11407  PyTuple_SET_ITEM(__pyx_t_16, 13, __pyx_t_14);
11408  __Pyx_GIVEREF(__pyx_t_15);
11409  PyTuple_SET_ITEM(__pyx_t_16, 14, __pyx_t_15);
11410  __pyx_t_1 = 0;
11411  __pyx_t_2 = 0;
11412  __pyx_t_3 = 0;
11413  __pyx_t_4 = 0;
11414  __pyx_t_5 = 0;
11415  __pyx_t_6 = 0;
11416  __pyx_t_7 = 0;
11417  __pyx_t_8 = 0;
11418  __pyx_t_9 = 0;
11419  __pyx_t_10 = 0;
11420  __pyx_t_11 = 0;
11421  __pyx_t_12 = 0;
11422  __pyx_t_13 = 0;
11423  __pyx_t_14 = 0;
11424  __pyx_t_15 = 0;
11425  __pyx_r = __pyx_t_16;
11426  __pyx_t_16 = 0;
11427  goto __pyx_L0;
11428 
11429  /* "cmeshTools.pyx":173
11430  * cmesh.volume)
11431  *
11432  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
11433  * """
11434  * function to be conform to old module, and to calls from MeshTools
11435  */
11436 
11437  /* function exit code */
11438  __pyx_L1_error:;
11439  __Pyx_XDECREF(__pyx_t_1);
11440  __Pyx_XDECREF(__pyx_t_2);
11441  __Pyx_XDECREF(__pyx_t_3);
11442  __Pyx_XDECREF(__pyx_t_4);
11443  __Pyx_XDECREF(__pyx_t_5);
11444  __Pyx_XDECREF(__pyx_t_6);
11445  __Pyx_XDECREF(__pyx_t_7);
11446  __Pyx_XDECREF(__pyx_t_8);
11447  __Pyx_XDECREF(__pyx_t_9);
11448  __Pyx_XDECREF(__pyx_t_10);
11449  __Pyx_XDECREF(__pyx_t_11);
11450  __Pyx_XDECREF(__pyx_t_12);
11451  __Pyx_XDECREF(__pyx_t_13);
11452  __Pyx_XDECREF(__pyx_t_14);
11453  __Pyx_XDECREF(__pyx_t_15);
11454  __Pyx_XDECREF(__pyx_t_16);
11455  __Pyx_AddTraceback("cmeshTools.buildPythonMeshInterfaceNoArrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
11456  __pyx_r = NULL;
11457  __pyx_L0:;
11458  __Pyx_XGIVEREF(__pyx_r);
11459  __Pyx_RefNannyFinishContext();
11460  return __pyx_r;
11461 }
11462 
11463 /* "cmeshTools.pyx":194
11464  * cmesh.volume)
11465  *
11466  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh): # <<<<<<<<<<<<<<
11467  * CMeshnew = CMesh()
11468  * CMeshnew.mesh = mesh
11469  */
11470 
11471 static struct __pyx_obj_10cmeshTools_CMesh *__pyx_f_10cmeshTools_CMesh_FromMesh(struct Mesh __pyx_v_mesh) {
11472  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_CMeshnew = NULL;
11473  struct __pyx_obj_10cmeshTools_CMesh *__pyx_r = NULL;
11474  __Pyx_RefNannyDeclarations
11475  PyObject *__pyx_t_1 = NULL;
11476  __Pyx_RefNannySetupContext("CMesh_FromMesh", 0);
11477 
11478  /* "cmeshTools.pyx":195
11479  *
11480  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11481  * CMeshnew = CMesh() # <<<<<<<<<<<<<<
11482  * CMeshnew.mesh = mesh
11483  * return CMeshnew
11484  */
11485  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10cmeshTools_CMesh)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 195, __pyx_L1_error)
11486  __Pyx_GOTREF(__pyx_t_1);
11487  __pyx_v_CMeshnew = ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_t_1);
11488  __pyx_t_1 = 0;
11489 
11490  /* "cmeshTools.pyx":196
11491  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11492  * CMeshnew = CMesh()
11493  * CMeshnew.mesh = mesh # <<<<<<<<<<<<<<
11494  * return CMeshnew
11495  *
11496  */
11497  __pyx_v_CMeshnew->mesh = __pyx_v_mesh;
11498 
11499  /* "cmeshTools.pyx":197
11500  * CMeshnew = CMesh()
11501  * CMeshnew.mesh = mesh
11502  * return CMeshnew # <<<<<<<<<<<<<<
11503  *
11504  * cdef class CMultilevelMesh:
11505  */
11506  __Pyx_XDECREF(((PyObject *)__pyx_r));
11507  __Pyx_INCREF(((PyObject *)__pyx_v_CMeshnew));
11508  __pyx_r = __pyx_v_CMeshnew;
11509  goto __pyx_L0;
11510 
11511  /* "cmeshTools.pyx":194
11512  * cmesh.volume)
11513  *
11514  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh): # <<<<<<<<<<<<<<
11515  * CMeshnew = CMesh()
11516  * CMeshnew.mesh = mesh
11517  */
11518 
11519  /* function exit code */
11520  __pyx_L1_error:;
11521  __Pyx_XDECREF(__pyx_t_1);
11522  __Pyx_AddTraceback("cmeshTools.CMesh_FromMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
11523  __pyx_r = 0;
11524  __pyx_L0:;
11525  __Pyx_XDECREF((PyObject *)__pyx_v_CMeshnew);
11526  __Pyx_XGIVEREF((PyObject *)__pyx_r);
11527  __Pyx_RefNannyFinishContext();
11528  return __pyx_r;
11529 }
11530 
11531 /* "cmeshTools.pyx":207
11532  * list elementChildrenArrayList
11533  * list elementChildrenOffsetsList
11534  * def __init__(self, CMesh cmesh, nLevels): # <<<<<<<<<<<<<<
11535  * self.multilevelMesh = cppm.MultilevelMesh()
11536  * if cmesh.mesh.nNodes_element == 2:
11537  */
11538 
11539 /* Python wrapper */
11540 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11541 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11542  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
11543  PyObject *__pyx_v_nLevels = 0;
11544  int __pyx_r;
11545  __Pyx_RefNannyDeclarations
11546  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
11547  {
11548  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_nLevels,0};
11549  PyObject* values[2] = {0,0};
11550  if (unlikely(__pyx_kwds)) {
11551  Py_ssize_t kw_args;
11552  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11553  switch (pos_args) {
11554  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11555  CYTHON_FALLTHROUGH;
11556  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11557  CYTHON_FALLTHROUGH;
11558  case 0: break;
11559  default: goto __pyx_L5_argtuple_error;
11560  }
11561  kw_args = PyDict_Size(__pyx_kwds);
11562  switch (pos_args) {
11563  case 0:
11564  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
11565  else goto __pyx_L5_argtuple_error;
11566  CYTHON_FALLTHROUGH;
11567  case 1:
11568  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nLevels)) != 0)) kw_args--;
11569  else {
11570  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 207, __pyx_L3_error)
11571  }
11572  }
11573  if (unlikely(kw_args > 0)) {
11574  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 207, __pyx_L3_error)
11575  }
11576  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11577  goto __pyx_L5_argtuple_error;
11578  } else {
11579  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11580  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11581  }
11582  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
11583  __pyx_v_nLevels = values[1];
11584  }
11585  goto __pyx_L4_argument_unpacking_done;
11586  __pyx_L5_argtuple_error:;
11587  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 207, __pyx_L3_error)
11588  __pyx_L3_error:;
11589  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11590  __Pyx_RefNannyFinishContext();
11591  return -1;
11592  __pyx_L4_argument_unpacking_done:;
11593  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 207, __pyx_L1_error)
11594  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), __pyx_v_cmesh, __pyx_v_nLevels);
11595 
11596  /* function exit code */
11597  goto __pyx_L0;
11598  __pyx_L1_error:;
11599  __pyx_r = -1;
11600  __pyx_L0:;
11601  __Pyx_RefNannyFinishContext();
11602  return __pyx_r;
11603 }
11604 
11605 static int __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_nLevels) {
11606  PyObject *__pyx_v_i = NULL;
11607  int __pyx_r;
11608  __Pyx_RefNannyDeclarations
11609  struct MultilevelMesh __pyx_t_1;
11610  int __pyx_t_2;
11611  int __pyx_t_3;
11612  PyObject *__pyx_t_4 = NULL;
11613  PyObject *__pyx_t_5 = NULL;
11614  Py_ssize_t __pyx_t_6;
11615  PyObject *(*__pyx_t_7)(PyObject *);
11616  Py_ssize_t __pyx_t_8;
11617  Py_ssize_t __pyx_t_9;
11618  Py_ssize_t __pyx_t_10;
11619  int __pyx_t_11;
11620  __Pyx_RefNannySetupContext("__init__", 0);
11621 
11622  /* "cmeshTools.pyx":208
11623  * list elementChildrenOffsetsList
11624  * def __init__(self, CMesh cmesh, nLevels):
11625  * self.multilevelMesh = cppm.MultilevelMesh() # <<<<<<<<<<<<<<
11626  * if cmesh.mesh.nNodes_element == 2:
11627  * cppm.globallyRefineEdgeMesh(nLevels,
11628  */
11629  __pyx_v_self->multilevelMesh = __pyx_t_1;
11630 
11631  /* "cmeshTools.pyx":209
11632  * def __init__(self, CMesh cmesh, nLevels):
11633  * self.multilevelMesh = cppm.MultilevelMesh()
11634  * if cmesh.mesh.nNodes_element == 2: # <<<<<<<<<<<<<<
11635  * cppm.globallyRefineEdgeMesh(nLevels,
11636  * cmesh.mesh,
11637  */
11638  __pyx_t_2 = ((__pyx_v_cmesh->mesh.nNodes_element == 2) != 0);
11639  if (__pyx_t_2) {
11640 
11641  /* "cmeshTools.pyx":210
11642  * self.multilevelMesh = cppm.MultilevelMesh()
11643  * if cmesh.mesh.nNodes_element == 2:
11644  * cppm.globallyRefineEdgeMesh(nLevels, # <<<<<<<<<<<<<<
11645  * cmesh.mesh,
11646  * self.multilevelMesh,
11647  */
11648  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 210, __pyx_L1_error)
11649 
11650  /* "cmeshTools.pyx":213
11651  * cmesh.mesh,
11652  * self.multilevelMesh,
11653  * False); # <<<<<<<<<<<<<<
11654  * for i in range(1, nLevels):
11655  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11656  */
11657  (void)(globallyRefineEdgeMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
11658 
11659  /* "cmeshTools.pyx":214
11660  * self.multilevelMesh,
11661  * False);
11662  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11663  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11664  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11665  */
11666  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 214, __pyx_L1_error)
11667  __Pyx_GOTREF(__pyx_t_4);
11668  __Pyx_INCREF(__pyx_int_1);
11669  __Pyx_GIVEREF(__pyx_int_1);
11670  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
11671  __Pyx_INCREF(__pyx_v_nLevels);
11672  __Pyx_GIVEREF(__pyx_v_nLevels);
11673  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
11674  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error)
11675  __Pyx_GOTREF(__pyx_t_5);
11676  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11677  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
11678  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
11679  __pyx_t_7 = NULL;
11680  } else {
11681  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 214, __pyx_L1_error)
11682  __Pyx_GOTREF(__pyx_t_4);
11683  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 214, __pyx_L1_error)
11684  }
11685  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11686  for (;;) {
11687  if (likely(!__pyx_t_7)) {
11688  if (likely(PyList_CheckExact(__pyx_t_4))) {
11689  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
11690  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11691  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 214, __pyx_L1_error)
11692  #else
11693  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error)
11694  __Pyx_GOTREF(__pyx_t_5);
11695  #endif
11696  } else {
11697  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
11698  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11699  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 214, __pyx_L1_error)
11700  #else
11701  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error)
11702  __Pyx_GOTREF(__pyx_t_5);
11703  #endif
11704  }
11705  } else {
11706  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
11707  if (unlikely(!__pyx_t_5)) {
11708  PyObject* exc_type = PyErr_Occurred();
11709  if (exc_type) {
11710  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11711  else __PYX_ERR(1, 214, __pyx_L1_error)
11712  }
11713  break;
11714  }
11715  __Pyx_GOTREF(__pyx_t_5);
11716  }
11717  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
11718  __pyx_t_5 = 0;
11719 
11720  /* "cmeshTools.pyx":215
11721  * False);
11722  * for i in range(1, nLevels):
11723  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11724  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11725  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11726  */
11727  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 215, __pyx_L1_error)
11728  (void)(constructElementBoundaryElementsArray_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
11729 
11730  /* "cmeshTools.pyx":216
11731  * for i in range(1, nLevels):
11732  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11733  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11734  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11735  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11736  */
11737  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 216, __pyx_L1_error)
11738  (void)(allocateGeometricInfo_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
11739 
11740  /* "cmeshTools.pyx":217
11741  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11742  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11743  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11744  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11745  * self.multilevelMesh.meshArray[i],
11746  */
11747  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 217, __pyx_L1_error)
11748  (void)(computeGeometricInfo_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
11749 
11750  /* "cmeshTools.pyx":218
11751  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11752  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11753  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11754  * self.multilevelMesh.meshArray[i],
11755  * self.multilevelMesh.elementParentsArray[i],
11756  */
11757  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 218, __pyx_L1_error)
11758  __Pyx_GOTREF(__pyx_t_5);
11759  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 218, __pyx_L1_error)
11760  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11761 
11762  /* "cmeshTools.pyx":219
11763  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11764  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11765  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
11766  * self.multilevelMesh.elementParentsArray[i],
11767  * 1);
11768  */
11769  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 219, __pyx_L1_error)
11770 
11771  /* "cmeshTools.pyx":220
11772  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11773  * self.multilevelMesh.meshArray[i],
11774  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
11775  * 1);
11776  * elif cmesh.mesh.nNodes_element == 3:
11777  */
11778  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 220, __pyx_L1_error)
11779 
11780  /* "cmeshTools.pyx":218
11781  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11782  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11783  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11784  * self.multilevelMesh.meshArray[i],
11785  * self.multilevelMesh.elementParentsArray[i],
11786  */
11787  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 1));
11788 
11789  /* "cmeshTools.pyx":214
11790  * self.multilevelMesh,
11791  * False);
11792  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11793  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11794  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11795  */
11796  }
11797  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11798 
11799  /* "cmeshTools.pyx":209
11800  * def __init__(self, CMesh cmesh, nLevels):
11801  * self.multilevelMesh = cppm.MultilevelMesh()
11802  * if cmesh.mesh.nNodes_element == 2: # <<<<<<<<<<<<<<
11803  * cppm.globallyRefineEdgeMesh(nLevels,
11804  * cmesh.mesh,
11805  */
11806  goto __pyx_L3;
11807  }
11808 
11809  /* "cmeshTools.pyx":222
11810  * self.multilevelMesh.elementParentsArray[i],
11811  * 1);
11812  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
11813  * cppm.globallyRefineTriangularMesh(nLevels,
11814  * cmesh.mesh,
11815  */
11816  __pyx_t_2 = ((__pyx_v_cmesh->mesh.nNodes_element == 3) != 0);
11817  if (__pyx_t_2) {
11818 
11819  /* "cmeshTools.pyx":223
11820  * 1);
11821  * elif cmesh.mesh.nNodes_element == 3:
11822  * cppm.globallyRefineTriangularMesh(nLevels, # <<<<<<<<<<<<<<
11823  * cmesh.mesh,
11824  * self.multilevelMesh,
11825  */
11826  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 223, __pyx_L1_error)
11827 
11828  /* "cmeshTools.pyx":226
11829  * cmesh.mesh,
11830  * self.multilevelMesh,
11831  * False); # <<<<<<<<<<<<<<
11832  * for i in range(1, nLevels):
11833  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11834  */
11835  (void)(globallyRefineTriangularMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
11836 
11837  /* "cmeshTools.pyx":227
11838  * self.multilevelMesh,
11839  * False);
11840  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11841  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11842  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11843  */
11844  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 227, __pyx_L1_error)
11845  __Pyx_GOTREF(__pyx_t_4);
11846  __Pyx_INCREF(__pyx_int_1);
11847  __Pyx_GIVEREF(__pyx_int_1);
11848  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
11849  __Pyx_INCREF(__pyx_v_nLevels);
11850  __Pyx_GIVEREF(__pyx_v_nLevels);
11851  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
11852  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 227, __pyx_L1_error)
11853  __Pyx_GOTREF(__pyx_t_5);
11854  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11855  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
11856  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
11857  __pyx_t_7 = NULL;
11858  } else {
11859  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 227, __pyx_L1_error)
11860  __Pyx_GOTREF(__pyx_t_4);
11861  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 227, __pyx_L1_error)
11862  }
11863  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11864  for (;;) {
11865  if (likely(!__pyx_t_7)) {
11866  if (likely(PyList_CheckExact(__pyx_t_4))) {
11867  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
11868  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11869  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 227, __pyx_L1_error)
11870  #else
11871  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 227, __pyx_L1_error)
11872  __Pyx_GOTREF(__pyx_t_5);
11873  #endif
11874  } else {
11875  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
11876  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11877  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 227, __pyx_L1_error)
11878  #else
11879  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 227, __pyx_L1_error)
11880  __Pyx_GOTREF(__pyx_t_5);
11881  #endif
11882  }
11883  } else {
11884  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
11885  if (unlikely(!__pyx_t_5)) {
11886  PyObject* exc_type = PyErr_Occurred();
11887  if (exc_type) {
11888  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11889  else __PYX_ERR(1, 227, __pyx_L1_error)
11890  }
11891  break;
11892  }
11893  __Pyx_GOTREF(__pyx_t_5);
11894  }
11895  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
11896  __pyx_t_5 = 0;
11897 
11898  /* "cmeshTools.pyx":228
11899  * False);
11900  * for i in range(1, nLevels):
11901  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11902  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11903  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11904  */
11905  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 228, __pyx_L1_error)
11906  (void)(constructElementBoundaryElementsArray_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
11907 
11908  /* "cmeshTools.pyx":229
11909  * for i in range(1, nLevels):
11910  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11911  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11912  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11913  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11914  */
11915  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 229, __pyx_L1_error)
11916  (void)(allocateGeometricInfo_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
11917 
11918  /* "cmeshTools.pyx":230
11919  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11920  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11921  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11922  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11923  * self.multilevelMesh.meshArray[i],
11924  */
11925  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error)
11926  (void)(computeGeometricInfo_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
11927 
11928  /* "cmeshTools.pyx":231
11929  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11930  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11931  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11932  * self.multilevelMesh.meshArray[i],
11933  * self.multilevelMesh.elementParentsArray[i],
11934  */
11935  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 231, __pyx_L1_error)
11936  __Pyx_GOTREF(__pyx_t_5);
11937  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 231, __pyx_L1_error)
11938  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11939 
11940  /* "cmeshTools.pyx":232
11941  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11942  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11943  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
11944  * self.multilevelMesh.elementParentsArray[i],
11945  * 2);
11946  */
11947  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 232, __pyx_L1_error)
11948 
11949  /* "cmeshTools.pyx":233
11950  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11951  * self.multilevelMesh.meshArray[i],
11952  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
11953  * 2);
11954  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2:
11955  */
11956  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 233, __pyx_L1_error)
11957 
11958  /* "cmeshTools.pyx":231
11959  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11960  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11961  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11962  * self.multilevelMesh.meshArray[i],
11963  * self.multilevelMesh.elementParentsArray[i],
11964  */
11965  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_8]), 2));
11966 
11967  /* "cmeshTools.pyx":227
11968  * self.multilevelMesh,
11969  * False);
11970  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11971  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11972  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11973  */
11974  }
11975  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11976 
11977  /* "cmeshTools.pyx":222
11978  * self.multilevelMesh.elementParentsArray[i],
11979  * 1);
11980  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
11981  * cppm.globallyRefineTriangularMesh(nLevels,
11982  * cmesh.mesh,
11983  */
11984  goto __pyx_L3;
11985  }
11986 
11987  /* "cmeshTools.pyx":235
11988  * self.multilevelMesh.elementParentsArray[i],
11989  * 2);
11990  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2: # <<<<<<<<<<<<<<
11991  * cppm.globallyRefineQuadrilateralMesh(nLevels,
11992  * cmesh.mesh,
11993  */
11994  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 4) != 0);
11995  if (__pyx_t_11) {
11996  } else {
11997  __pyx_t_2 = __pyx_t_11;
11998  goto __pyx_L8_bool_binop_done;
11999  }
12000  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 2) != 0);
12001  __pyx_t_2 = __pyx_t_11;
12002  __pyx_L8_bool_binop_done:;
12003  if (__pyx_t_2) {
12004 
12005  /* "cmeshTools.pyx":236
12006  * 2);
12007  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2:
12008  * cppm.globallyRefineQuadrilateralMesh(nLevels, # <<<<<<<<<<<<<<
12009  * cmesh.mesh,
12010  * self.multilevelMesh,
12011  */
12012  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L1_error)
12013 
12014  /* "cmeshTools.pyx":239
12015  * cmesh.mesh,
12016  * self.multilevelMesh,
12017  * False); # <<<<<<<<<<<<<<
12018  * for i in range(1, nLevels):
12019  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12020  */
12021  (void)(globallyRefineQuadrilateralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12022 
12023  /* "cmeshTools.pyx":240
12024  * self.multilevelMesh,
12025  * False);
12026  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12027  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12028  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12029  */
12030  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L1_error)
12031  __Pyx_GOTREF(__pyx_t_4);
12032  __Pyx_INCREF(__pyx_int_1);
12033  __Pyx_GIVEREF(__pyx_int_1);
12034  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12035  __Pyx_INCREF(__pyx_v_nLevels);
12036  __Pyx_GIVEREF(__pyx_v_nLevels);
12037  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12038  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L1_error)
12039  __Pyx_GOTREF(__pyx_t_5);
12040  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12041  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12042  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12043  __pyx_t_7 = NULL;
12044  } else {
12045  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L1_error)
12046  __Pyx_GOTREF(__pyx_t_4);
12047  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 240, __pyx_L1_error)
12048  }
12049  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12050  for (;;) {
12051  if (likely(!__pyx_t_7)) {
12052  if (likely(PyList_CheckExact(__pyx_t_4))) {
12053  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12054  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12055  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 240, __pyx_L1_error)
12056  #else
12057  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L1_error)
12058  __Pyx_GOTREF(__pyx_t_5);
12059  #endif
12060  } else {
12061  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12062  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12063  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 240, __pyx_L1_error)
12064  #else
12065  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L1_error)
12066  __Pyx_GOTREF(__pyx_t_5);
12067  #endif
12068  }
12069  } else {
12070  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12071  if (unlikely(!__pyx_t_5)) {
12072  PyObject* exc_type = PyErr_Occurred();
12073  if (exc_type) {
12074  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12075  else __PYX_ERR(1, 240, __pyx_L1_error)
12076  }
12077  break;
12078  }
12079  __Pyx_GOTREF(__pyx_t_5);
12080  }
12081  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12082  __pyx_t_5 = 0;
12083 
12084  /* "cmeshTools.pyx":241
12085  * False);
12086  * for i in range(1, nLevels):
12087  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12088  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12089  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12090  */
12091  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 241, __pyx_L1_error)
12092  (void)(constructElementBoundaryElementsArray_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12093 
12094  /* "cmeshTools.pyx":242
12095  * for i in range(1, nLevels):
12096  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12097  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12098  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12099  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12100  */
12101  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 242, __pyx_L1_error)
12102  (void)(allocateGeometricInfo_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12103 
12104  /* "cmeshTools.pyx":243
12105  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12106  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12107  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12108  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12109  * self.multilevelMesh.meshArray[i],
12110  */
12111  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 243, __pyx_L1_error)
12112  (void)(computeGeometricInfo_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12113 
12114  /* "cmeshTools.pyx":244
12115  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12116  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12117  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12118  * self.multilevelMesh.meshArray[i],
12119  * self.multilevelMesh.elementParentsArray[i],
12120  */
12121  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 244, __pyx_L1_error)
12122  __Pyx_GOTREF(__pyx_t_5);
12123  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 244, __pyx_L1_error)
12124  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12125 
12126  /* "cmeshTools.pyx":245
12127  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12128  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12129  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12130  * self.multilevelMesh.elementParentsArray[i],
12131  * 2);
12132  */
12133  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 245, __pyx_L1_error)
12134 
12135  /* "cmeshTools.pyx":246
12136  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12137  * self.multilevelMesh.meshArray[i],
12138  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12139  * 2);
12140  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3:
12141  */
12142  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 246, __pyx_L1_error)
12143 
12144  /* "cmeshTools.pyx":244
12145  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12146  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12147  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12148  * self.multilevelMesh.meshArray[i],
12149  * self.multilevelMesh.elementParentsArray[i],
12150  */
12151  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 2));
12152 
12153  /* "cmeshTools.pyx":240
12154  * self.multilevelMesh,
12155  * False);
12156  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12157  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12158  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12159  */
12160  }
12161  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12162 
12163  /* "cmeshTools.pyx":235
12164  * self.multilevelMesh.elementParentsArray[i],
12165  * 2);
12166  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2: # <<<<<<<<<<<<<<
12167  * cppm.globallyRefineQuadrilateralMesh(nLevels,
12168  * cmesh.mesh,
12169  */
12170  goto __pyx_L3;
12171  }
12172 
12173  /* "cmeshTools.pyx":248
12174  * self.multilevelMesh.elementParentsArray[i],
12175  * 2);
12176  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3: # <<<<<<<<<<<<<<
12177  * cppm.globallyRefineTetrahedralMesh(nLevels,
12178  * cmesh.mesh,
12179  */
12180  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 4) != 0);
12181  if (__pyx_t_11) {
12182  } else {
12183  __pyx_t_2 = __pyx_t_11;
12184  goto __pyx_L12_bool_binop_done;
12185  }
12186  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 3) != 0);
12187  __pyx_t_2 = __pyx_t_11;
12188  __pyx_L12_bool_binop_done:;
12189  if (__pyx_t_2) {
12190 
12191  /* "cmeshTools.pyx":249
12192  * 2);
12193  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3:
12194  * cppm.globallyRefineTetrahedralMesh(nLevels, # <<<<<<<<<<<<<<
12195  * cmesh.mesh,
12196  * self.multilevelMesh,
12197  */
12198  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L1_error)
12199 
12200  /* "cmeshTools.pyx":252
12201  * cmesh.mesh,
12202  * self.multilevelMesh,
12203  * False); # <<<<<<<<<<<<<<
12204  * for i in range(1, nLevels):
12205  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12206  */
12207  (void)(globallyRefineTetrahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12208 
12209  /* "cmeshTools.pyx":253
12210  * self.multilevelMesh,
12211  * False);
12212  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12213  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12214  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12215  */
12216  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 253, __pyx_L1_error)
12217  __Pyx_GOTREF(__pyx_t_4);
12218  __Pyx_INCREF(__pyx_int_1);
12219  __Pyx_GIVEREF(__pyx_int_1);
12220  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12221  __Pyx_INCREF(__pyx_v_nLevels);
12222  __Pyx_GIVEREF(__pyx_v_nLevels);
12223  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12224  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 253, __pyx_L1_error)
12225  __Pyx_GOTREF(__pyx_t_5);
12226  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12227  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12228  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12229  __pyx_t_7 = NULL;
12230  } else {
12231  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 253, __pyx_L1_error)
12232  __Pyx_GOTREF(__pyx_t_4);
12233  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 253, __pyx_L1_error)
12234  }
12235  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12236  for (;;) {
12237  if (likely(!__pyx_t_7)) {
12238  if (likely(PyList_CheckExact(__pyx_t_4))) {
12239  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12240  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12241  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 253, __pyx_L1_error)
12242  #else
12243  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 253, __pyx_L1_error)
12244  __Pyx_GOTREF(__pyx_t_5);
12245  #endif
12246  } else {
12247  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12248  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12249  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 253, __pyx_L1_error)
12250  #else
12251  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 253, __pyx_L1_error)
12252  __Pyx_GOTREF(__pyx_t_5);
12253  #endif
12254  }
12255  } else {
12256  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12257  if (unlikely(!__pyx_t_5)) {
12258  PyObject* exc_type = PyErr_Occurred();
12259  if (exc_type) {
12260  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12261  else __PYX_ERR(1, 253, __pyx_L1_error)
12262  }
12263  break;
12264  }
12265  __Pyx_GOTREF(__pyx_t_5);
12266  }
12267  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12268  __pyx_t_5 = 0;
12269 
12270  /* "cmeshTools.pyx":254
12271  * False);
12272  * for i in range(1, nLevels):
12273  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12274  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12275  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12276  */
12277  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 254, __pyx_L1_error)
12278  (void)(constructElementBoundaryElementsArray_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12279 
12280  /* "cmeshTools.pyx":255
12281  * for i in range(1, nLevels):
12282  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12283  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12284  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12285  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12286  */
12287  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 255, __pyx_L1_error)
12288  (void)(allocateGeometricInfo_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12289 
12290  /* "cmeshTools.pyx":256
12291  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12292  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12293  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12294  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12295  * self.multilevelMesh.meshArray[i],
12296  */
12297  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 256, __pyx_L1_error)
12298  (void)(computeGeometricInfo_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12299 
12300  /* "cmeshTools.pyx":257
12301  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12302  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12303  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12304  * self.multilevelMesh.meshArray[i],
12305  * self.multilevelMesh.elementParentsArray[i],
12306  */
12307  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 257, __pyx_L1_error)
12308  __Pyx_GOTREF(__pyx_t_5);
12309  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L1_error)
12310  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12311 
12312  /* "cmeshTools.pyx":258
12313  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12314  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12315  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12316  * self.multilevelMesh.elementParentsArray[i],
12317  * 3);
12318  */
12319  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 258, __pyx_L1_error)
12320 
12321  /* "cmeshTools.pyx":259
12322  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12323  * self.multilevelMesh.meshArray[i],
12324  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12325  * 3);
12326  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4:
12327  */
12328  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 259, __pyx_L1_error)
12329 
12330  /* "cmeshTools.pyx":257
12331  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12332  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12333  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12334  * self.multilevelMesh.meshArray[i],
12335  * self.multilevelMesh.elementParentsArray[i],
12336  */
12337  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_8]), 3));
12338 
12339  /* "cmeshTools.pyx":253
12340  * self.multilevelMesh,
12341  * False);
12342  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12343  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12344  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12345  */
12346  }
12347  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12348 
12349  /* "cmeshTools.pyx":248
12350  * self.multilevelMesh.elementParentsArray[i],
12351  * 2);
12352  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3: # <<<<<<<<<<<<<<
12353  * cppm.globallyRefineTetrahedralMesh(nLevels,
12354  * cmesh.mesh,
12355  */
12356  goto __pyx_L3;
12357  }
12358 
12359  /* "cmeshTools.pyx":261
12360  * self.multilevelMesh.elementParentsArray[i],
12361  * 3);
12362  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4: # <<<<<<<<<<<<<<
12363  * cppm.globallyRefineHexahedralMesh(nLevels,
12364  * cmesh.mesh,
12365  */
12366  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 8) != 0);
12367  if (__pyx_t_11) {
12368  } else {
12369  __pyx_t_2 = __pyx_t_11;
12370  goto __pyx_L16_bool_binop_done;
12371  }
12372  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 4) != 0);
12373  __pyx_t_2 = __pyx_t_11;
12374  __pyx_L16_bool_binop_done:;
12375  if (__pyx_t_2) {
12376 
12377  /* "cmeshTools.pyx":262
12378  * 3);
12379  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4:
12380  * cppm.globallyRefineHexahedralMesh(nLevels, # <<<<<<<<<<<<<<
12381  * cmesh.mesh,
12382  * self.multilevelMesh,
12383  */
12384  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 262, __pyx_L1_error)
12385 
12386  /* "cmeshTools.pyx":265
12387  * cmesh.mesh,
12388  * self.multilevelMesh,
12389  * False); # <<<<<<<<<<<<<<
12390  * for i in range(1, nLevels):
12391  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12392  */
12393  (void)(globallyRefineHexahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12394 
12395  /* "cmeshTools.pyx":266
12396  * self.multilevelMesh,
12397  * False);
12398  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12399  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12400  * meshArray[i]);
12401  */
12402  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 266, __pyx_L1_error)
12403  __Pyx_GOTREF(__pyx_t_4);
12404  __Pyx_INCREF(__pyx_int_1);
12405  __Pyx_GIVEREF(__pyx_int_1);
12406  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12407  __Pyx_INCREF(__pyx_v_nLevels);
12408  __Pyx_GIVEREF(__pyx_v_nLevels);
12409  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12410  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 266, __pyx_L1_error)
12411  __Pyx_GOTREF(__pyx_t_5);
12412  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12413  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12414  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12415  __pyx_t_7 = NULL;
12416  } else {
12417  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 266, __pyx_L1_error)
12418  __Pyx_GOTREF(__pyx_t_4);
12419  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 266, __pyx_L1_error)
12420  }
12421  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12422  for (;;) {
12423  if (likely(!__pyx_t_7)) {
12424  if (likely(PyList_CheckExact(__pyx_t_4))) {
12425  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12426  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12427  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 266, __pyx_L1_error)
12428  #else
12429  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 266, __pyx_L1_error)
12430  __Pyx_GOTREF(__pyx_t_5);
12431  #endif
12432  } else {
12433  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12434  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12435  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 266, __pyx_L1_error)
12436  #else
12437  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 266, __pyx_L1_error)
12438  __Pyx_GOTREF(__pyx_t_5);
12439  #endif
12440  }
12441  } else {
12442  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12443  if (unlikely(!__pyx_t_5)) {
12444  PyObject* exc_type = PyErr_Occurred();
12445  if (exc_type) {
12446  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12447  else __PYX_ERR(1, 266, __pyx_L1_error)
12448  }
12449  break;
12450  }
12451  __Pyx_GOTREF(__pyx_t_5);
12452  }
12453  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12454  __pyx_t_5 = 0;
12455 
12456  /* "cmeshTools.pyx":268
12457  * for i in range(1, nLevels):
12458  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12459  * meshArray[i]); # <<<<<<<<<<<<<<
12460  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12461  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12462  */
12463  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 268, __pyx_L1_error)
12464 
12465  /* "cmeshTools.pyx":267
12466  * False);
12467  * for i in range(1, nLevels):
12468  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh. # <<<<<<<<<<<<<<
12469  * meshArray[i]);
12470  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12471  */
12472  (void)(constructElementBoundaryElementsArray_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12473 
12474  /* "cmeshTools.pyx":269
12475  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12476  * meshArray[i]);
12477  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12478  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12479  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12480  */
12481  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 269, __pyx_L1_error)
12482  (void)(allocateGeometricInfo_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12483 
12484  /* "cmeshTools.pyx":270
12485  * meshArray[i]);
12486  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12487  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12488  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12489  * self.multilevelMesh.meshArray[i],
12490  */
12491  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 270, __pyx_L1_error)
12492  (void)(computeGeometricInfo_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12493 
12494  /* "cmeshTools.pyx":271
12495  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12496  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12497  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12498  * self.multilevelMesh.meshArray[i],
12499  * self.multilevelMesh.elementParentsArray[i],
12500  */
12501  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 271, __pyx_L1_error)
12502  __Pyx_GOTREF(__pyx_t_5);
12503  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 271, __pyx_L1_error)
12504  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12505 
12506  /* "cmeshTools.pyx":272
12507  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12508  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12509  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12510  * self.multilevelMesh.elementParentsArray[i],
12511  * 4);
12512  */
12513  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 272, __pyx_L1_error)
12514 
12515  /* "cmeshTools.pyx":273
12516  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12517  * self.multilevelMesh.meshArray[i],
12518  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12519  * 4);
12520  * else:
12521  */
12522  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 273, __pyx_L1_error)
12523 
12524  /* "cmeshTools.pyx":271
12525  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12526  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12527  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12528  * self.multilevelMesh.meshArray[i],
12529  * self.multilevelMesh.elementParentsArray[i],
12530  */
12531  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 4));
12532 
12533  /* "cmeshTools.pyx":266
12534  * self.multilevelMesh,
12535  * False);
12536  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12537  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12538  * meshArray[i]);
12539  */
12540  }
12541  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12542 
12543  /* "cmeshTools.pyx":261
12544  * self.multilevelMesh.elementParentsArray[i],
12545  * 3);
12546  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4: # <<<<<<<<<<<<<<
12547  * cppm.globallyRefineHexahedralMesh(nLevels,
12548  * cmesh.mesh,
12549  */
12550  goto __pyx_L3;
12551  }
12552 
12553  /* "cmeshTools.pyx":276
12554  * 4);
12555  * else:
12556  * assert nLevels == 1, 'wrong nLevels' # <<<<<<<<<<<<<<
12557  * cppm.globallyRefineTetrahedralMesh(nLevels,
12558  * cmesh.mesh,
12559  */
12560  /*else*/ {
12561  #ifndef CYTHON_WITHOUT_ASSERTIONS
12562  if (unlikely(!Py_OptimizeFlag)) {
12563  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_nLevels, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 276, __pyx_L1_error)
12564  __Pyx_GOTREF(__pyx_t_4);
12565  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 276, __pyx_L1_error)
12566  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12567  if (unlikely(!__pyx_t_2)) {
12568  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_wrong_nLevels);
12569  __PYX_ERR(1, 276, __pyx_L1_error)
12570  }
12571  }
12572  #endif
12573 
12574  /* "cmeshTools.pyx":277
12575  * else:
12576  * assert nLevels == 1, 'wrong nLevels'
12577  * cppm.globallyRefineTetrahedralMesh(nLevels, # <<<<<<<<<<<<<<
12578  * cmesh.mesh,
12579  * self.multilevelMesh,
12580  */
12581  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 277, __pyx_L1_error)
12582 
12583  /* "cmeshTools.pyx":280
12584  * cmesh.mesh,
12585  * self.multilevelMesh,
12586  * False); # <<<<<<<<<<<<<<
12587  *
12588  * def buildPythonMultilevelMeshInterface(self):
12589  */
12590  (void)(globallyRefineTetrahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12591  }
12592  __pyx_L3:;
12593 
12594  /* "cmeshTools.pyx":207
12595  * list elementChildrenArrayList
12596  * list elementChildrenOffsetsList
12597  * def __init__(self, CMesh cmesh, nLevels): # <<<<<<<<<<<<<<
12598  * self.multilevelMesh = cppm.MultilevelMesh()
12599  * if cmesh.mesh.nNodes_element == 2:
12600  */
12601 
12602  /* function exit code */
12603  __pyx_r = 0;
12604  goto __pyx_L0;
12605  __pyx_L1_error:;
12606  __Pyx_XDECREF(__pyx_t_4);
12607  __Pyx_XDECREF(__pyx_t_5);
12608  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12609  __pyx_r = -1;
12610  __pyx_L0:;
12611  __Pyx_XDECREF(__pyx_v_i);
12612  __Pyx_RefNannyFinishContext();
12613  return __pyx_r;
12614 }
12615 
12616 /* "cmeshTools.pyx":282
12617  * False);
12618  *
12619  * def buildPythonMultilevelMeshInterface(self): # <<<<<<<<<<<<<<
12620  * cdef int dim
12621  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
12622  */
12623 
12624 /* Python wrapper */
12625 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12626 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12627  PyObject *__pyx_r = 0;
12628  __Pyx_RefNannyDeclarations
12629  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface (wrapper)", 0);
12630  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
12631 
12632  /* function exit code */
12633  __Pyx_RefNannyFinishContext();
12634  return __pyx_r;
12635 }
12636 
12637 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
12638  CYTHON_UNUSED int __pyx_v_dim;
12639  PyObject *__pyx_v_n = NULL;
12640  PyObject *__pyx_r = NULL;
12641  __Pyx_RefNannyDeclarations
12642  PyObject *__pyx_t_1 = NULL;
12643  PyObject *__pyx_t_2 = NULL;
12644  PyObject *__pyx_t_3 = NULL;
12645  Py_ssize_t __pyx_t_4;
12646  PyObject *(*__pyx_t_5)(PyObject *);
12647  Py_ssize_t __pyx_t_6;
12648  int __pyx_t_7;
12649  PyObject *__pyx_t_8 = NULL;
12650  int *__pyx_t_9;
12651  struct __pyx_array_obj *__pyx_t_10 = NULL;
12652  PyObject *__pyx_t_11 = NULL;
12653  Py_ssize_t __pyx_t_12;
12654  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface", 0);
12655 
12656  /* "cmeshTools.pyx":284
12657  * def buildPythonMultilevelMeshInterface(self):
12658  * cdef int dim
12659  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])] # <<<<<<<<<<<<<<
12660  * self.elementParentsArrayList = [np.zeros(0)]
12661  * self.elementChildrenArrayList = []
12662  */
12663  __pyx_t_1 = ((PyObject *)__pyx_f_10cmeshTools_CMesh_FromMesh((__pyx_v_self->multilevelMesh.meshArray[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 284, __pyx_L1_error)
12664  __Pyx_GOTREF(__pyx_t_1);
12665  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 284, __pyx_L1_error)
12666  __Pyx_GOTREF(__pyx_t_2);
12667  __Pyx_GIVEREF(__pyx_t_1);
12668  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
12669  __pyx_t_1 = 0;
12670  __Pyx_GIVEREF(__pyx_t_2);
12671  __Pyx_GOTREF(__pyx_v_self->cmeshList);
12672  __Pyx_DECREF(__pyx_v_self->cmeshList);
12673  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_2);
12674  __pyx_t_2 = 0;
12675 
12676  /* "cmeshTools.pyx":285
12677  * cdef int dim
12678  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
12679  * self.elementParentsArrayList = [np.zeros(0)] # <<<<<<<<<<<<<<
12680  * self.elementChildrenArrayList = []
12681  * self.elementChildrenOffsetsList = []
12682  */
12683  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 285, __pyx_L1_error)
12684  __Pyx_GOTREF(__pyx_t_1);
12685  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error)
12686  __Pyx_GOTREF(__pyx_t_3);
12687  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12688  __pyx_t_1 = NULL;
12689  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
12690  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
12691  if (likely(__pyx_t_1)) {
12692  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12693  __Pyx_INCREF(__pyx_t_1);
12694  __Pyx_INCREF(function);
12695  __Pyx_DECREF_SET(__pyx_t_3, function);
12696  }
12697  }
12698  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
12699  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12700  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 285, __pyx_L1_error)
12701  __Pyx_GOTREF(__pyx_t_2);
12702  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12703  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error)
12704  __Pyx_GOTREF(__pyx_t_3);
12705  __Pyx_GIVEREF(__pyx_t_2);
12706  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
12707  __pyx_t_2 = 0;
12708  __Pyx_GIVEREF(__pyx_t_3);
12709  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
12710  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
12711  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_3);
12712  __pyx_t_3 = 0;
12713 
12714  /* "cmeshTools.pyx":286
12715  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
12716  * self.elementParentsArrayList = [np.zeros(0)]
12717  * self.elementChildrenArrayList = [] # <<<<<<<<<<<<<<
12718  * self.elementChildrenOffsetsList = []
12719  * for n in range(1, self.multilevelMesh.nLevels):
12720  */
12721  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 286, __pyx_L1_error)
12722  __Pyx_GOTREF(__pyx_t_3);
12723  __Pyx_GIVEREF(__pyx_t_3);
12724  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
12725  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
12726  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_3);
12727  __pyx_t_3 = 0;
12728 
12729  /* "cmeshTools.pyx":287
12730  * self.elementParentsArrayList = [np.zeros(0)]
12731  * self.elementChildrenArrayList = []
12732  * self.elementChildrenOffsetsList = [] # <<<<<<<<<<<<<<
12733  * for n in range(1, self.multilevelMesh.nLevels):
12734  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12735  */
12736  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 287, __pyx_L1_error)
12737  __Pyx_GOTREF(__pyx_t_3);
12738  __Pyx_GIVEREF(__pyx_t_3);
12739  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
12740  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
12741  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_3);
12742  __pyx_t_3 = 0;
12743 
12744  /* "cmeshTools.pyx":288
12745  * self.elementChildrenArrayList = []
12746  * self.elementChildrenOffsetsList = []
12747  * for n in range(1, self.multilevelMesh.nLevels): # <<<<<<<<<<<<<<
12748  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12749  * dim = self.multilevelMesh.meshArray[n].nElements_global
12750  */
12751  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->multilevelMesh.nLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12752  __Pyx_GOTREF(__pyx_t_3);
12753  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 288, __pyx_L1_error)
12754  __Pyx_GOTREF(__pyx_t_2);
12755  __Pyx_INCREF(__pyx_int_1);
12756  __Pyx_GIVEREF(__pyx_int_1);
12757  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
12758  __Pyx_GIVEREF(__pyx_t_3);
12759  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
12760  __pyx_t_3 = 0;
12761  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12762  __Pyx_GOTREF(__pyx_t_3);
12763  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12764  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
12765  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
12766  __pyx_t_5 = NULL;
12767  } else {
12768  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 288, __pyx_L1_error)
12769  __Pyx_GOTREF(__pyx_t_2);
12770  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 288, __pyx_L1_error)
12771  }
12772  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12773  for (;;) {
12774  if (likely(!__pyx_t_5)) {
12775  if (likely(PyList_CheckExact(__pyx_t_2))) {
12776  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
12777  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12778  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 288, __pyx_L1_error)
12779  #else
12780  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12781  __Pyx_GOTREF(__pyx_t_3);
12782  #endif
12783  } else {
12784  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
12785  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12786  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 288, __pyx_L1_error)
12787  #else
12788  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12789  __Pyx_GOTREF(__pyx_t_3);
12790  #endif
12791  }
12792  } else {
12793  __pyx_t_3 = __pyx_t_5(__pyx_t_2);
12794  if (unlikely(!__pyx_t_3)) {
12795  PyObject* exc_type = PyErr_Occurred();
12796  if (exc_type) {
12797  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12798  else __PYX_ERR(1, 288, __pyx_L1_error)
12799  }
12800  break;
12801  }
12802  __Pyx_GOTREF(__pyx_t_3);
12803  }
12804  __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
12805  __pyx_t_3 = 0;
12806 
12807  /* "cmeshTools.pyx":289
12808  * self.elementChildrenOffsetsList = []
12809  * for n in range(1, self.multilevelMesh.nLevels):
12810  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])] # <<<<<<<<<<<<<<
12811  * dim = self.multilevelMesh.meshArray[n].nElements_global
12812  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12813  */
12814  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 289, __pyx_L1_error)
12815  __pyx_t_3 = ((PyObject *)__pyx_f_10cmeshTools_CMesh_FromMesh((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_6]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 289, __pyx_L1_error)
12816  __Pyx_GOTREF(__pyx_t_3);
12817  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error)
12818  __Pyx_GOTREF(__pyx_t_1);
12819  __Pyx_GIVEREF(__pyx_t_3);
12820  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
12821  __pyx_t_3 = 0;
12822  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->cmeshList, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 289, __pyx_L1_error)
12823  __Pyx_GOTREF(__pyx_t_3);
12824  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12825  __Pyx_GIVEREF(__pyx_t_3);
12826  __Pyx_GOTREF(__pyx_v_self->cmeshList);
12827  __Pyx_DECREF(__pyx_v_self->cmeshList);
12828  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_3);
12829  __pyx_t_3 = 0;
12830 
12831  /* "cmeshTools.pyx":290
12832  * for n in range(1, self.multilevelMesh.nLevels):
12833  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12834  * dim = self.multilevelMesh.meshArray[n].nElements_global # <<<<<<<<<<<<<<
12835  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12836  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12837  */
12838  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 290, __pyx_L1_error)
12839  __pyx_t_7 = (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_6]).nElements_global;
12840  __pyx_v_dim = __pyx_t_7;
12841 
12842  /* "cmeshTools.pyx":291
12843  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12844  * dim = self.multilevelMesh.meshArray[n].nElements_global
12845  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])] # <<<<<<<<<<<<<<
12846  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12847  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12848  */
12849  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error)
12850  __Pyx_GOTREF(__pyx_t_1);
12851  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 291, __pyx_L1_error)
12852  __Pyx_GOTREF(__pyx_t_8);
12853  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12854  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 291, __pyx_L1_error)
12855  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_6]);
12856  if (!__pyx_t_9) {
12857  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
12858  __PYX_ERR(1, 291, __pyx_L1_error)
12859  }
12860  __pyx_t_11 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
12861  __pyx_t_1 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim));
12862  if (unlikely(!__pyx_t_11 || !__pyx_t_1 || !PyBytes_AsString(__pyx_t_11))) __PYX_ERR(1, 291, __pyx_L1_error)
12863  __Pyx_GOTREF(__pyx_t_11);
12864  __Pyx_GOTREF(__pyx_t_1);
12865  __pyx_t_10 = __pyx_array_new(__pyx_t_1, sizeof(int), PyBytes_AS_STRING(__pyx_t_11), (char *) "c", (char *) __pyx_t_9);
12866  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 291, __pyx_L1_error)
12867  __Pyx_GOTREF(__pyx_t_10);
12868  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12869  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12870  __pyx_t_11 = NULL;
12871  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
12872  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
12873  if (likely(__pyx_t_11)) {
12874  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
12875  __Pyx_INCREF(__pyx_t_11);
12876  __Pyx_INCREF(function);
12877  __Pyx_DECREF_SET(__pyx_t_8, function);
12878  }
12879  }
12880  __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_11, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_t_10));
12881  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
12882  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
12883  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
12884  __Pyx_GOTREF(__pyx_t_3);
12885  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12886  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 291, __pyx_L1_error)
12887  __Pyx_GOTREF(__pyx_t_8);
12888  __Pyx_GIVEREF(__pyx_t_3);
12889  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
12890  __pyx_t_3 = 0;
12891  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementParentsArrayList, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
12892  __Pyx_GOTREF(__pyx_t_3);
12893  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12894  __Pyx_GIVEREF(__pyx_t_3);
12895  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
12896  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
12897  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_3);
12898  __pyx_t_3 = 0;
12899 
12900  /* "cmeshTools.pyx":292
12901  * dim = self.multilevelMesh.meshArray[n].nElements_global
12902  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12903  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global] # <<<<<<<<<<<<<<
12904  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12905  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
12906  */
12907  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
12908  __Pyx_GOTREF(__pyx_t_3);
12909  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 292, __pyx_L1_error)
12910  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12911  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
12912  __Pyx_GOTREF(__pyx_t_3);
12913  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 292, __pyx_L1_error)
12914  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12915  __pyx_v_dim = ((__pyx_v_self->multilevelMesh.elementChildrenOffsets[__pyx_t_6])[(__pyx_v_self->multilevelMesh.meshArray[__pyx_t_12]).nElements_global]);
12916 
12917  /* "cmeshTools.pyx":293
12918  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12919  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12920  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])] # <<<<<<<<<<<<<<
12921  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
12922  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
12923  */
12924  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 293, __pyx_L1_error)
12925  __Pyx_GOTREF(__pyx_t_8);
12926  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_asarray); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 293, __pyx_L1_error)
12927  __Pyx_GOTREF(__pyx_t_11);
12928  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12929  __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 293, __pyx_L1_error)
12930  __Pyx_GOTREF(__pyx_t_8);
12931  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 293, __pyx_L1_error)
12932  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12933  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementChildrenArray[__pyx_t_12]);
12934  if (!__pyx_t_9) {
12935  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
12936  __PYX_ERR(1, 293, __pyx_L1_error)
12937  }
12938  __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
12939  __pyx_t_8 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim));
12940  if (unlikely(!__pyx_t_1 || !__pyx_t_8 || !PyBytes_AsString(__pyx_t_1))) __PYX_ERR(1, 293, __pyx_L1_error)
12941  __Pyx_GOTREF(__pyx_t_1);
12942  __Pyx_GOTREF(__pyx_t_8);
12943  __pyx_t_10 = __pyx_array_new(__pyx_t_8, sizeof(int), PyBytes_AS_STRING(__pyx_t_1), (char *) "c", (char *) __pyx_t_9);
12944  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 293, __pyx_L1_error)
12945  __Pyx_GOTREF(__pyx_t_10);
12946  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12947  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12948  __pyx_t_1 = NULL;
12949  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
12950  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
12951  if (likely(__pyx_t_1)) {
12952  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
12953  __Pyx_INCREF(__pyx_t_1);
12954  __Pyx_INCREF(function);
12955  __Pyx_DECREF_SET(__pyx_t_11, function);
12956  }
12957  }
12958  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_11, ((PyObject *)__pyx_t_10));
12959  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12960  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
12961  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 293, __pyx_L1_error)
12962  __Pyx_GOTREF(__pyx_t_3);
12963  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12964  __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 293, __pyx_L1_error)
12965  __Pyx_GOTREF(__pyx_t_11);
12966  __Pyx_GIVEREF(__pyx_t_3);
12967  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
12968  __pyx_t_3 = 0;
12969  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementChildrenArrayList, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 293, __pyx_L1_error)
12970  __Pyx_GOTREF(__pyx_t_3);
12971  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12972  __Pyx_GIVEREF(__pyx_t_3);
12973  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
12974  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
12975  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_3);
12976  __pyx_t_3 = 0;
12977 
12978  /* "cmeshTools.pyx":294
12979  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12980  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12981  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1; # <<<<<<<<<<<<<<
12982  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
12983  *
12984  */
12985  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 294, __pyx_L1_error)
12986  __Pyx_GOTREF(__pyx_t_3);
12987  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 294, __pyx_L1_error)
12988  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12989  __pyx_v_dim = ((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_12]).nElements_global + 1);
12990 
12991  /* "cmeshTools.pyx":295
12992  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12993  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
12994  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])] # <<<<<<<<<<<<<<
12995  *
12996  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
12997  */
12998  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 295, __pyx_L1_error)
12999  __Pyx_GOTREF(__pyx_t_11);
13000  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error)
13001  __Pyx_GOTREF(__pyx_t_1);
13002  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13003  __pyx_t_11 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 295, __pyx_L1_error)
13004  __Pyx_GOTREF(__pyx_t_11);
13005  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error)
13006  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13007  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementChildrenOffsets[__pyx_t_12]);
13008  if (!__pyx_t_9) {
13009  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
13010  __PYX_ERR(1, 295, __pyx_L1_error)
13011  }
13012  __pyx_t_8 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
13013  __pyx_t_11 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim));
13014  if (unlikely(!__pyx_t_8 || !__pyx_t_11 || !PyBytes_AsString(__pyx_t_8))) __PYX_ERR(1, 295, __pyx_L1_error)
13015  __Pyx_GOTREF(__pyx_t_8);
13016  __Pyx_GOTREF(__pyx_t_11);
13017  __pyx_t_10 = __pyx_array_new(__pyx_t_11, sizeof(int), PyBytes_AS_STRING(__pyx_t_8), (char *) "c", (char *) __pyx_t_9);
13018  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 295, __pyx_L1_error)
13019  __Pyx_GOTREF(__pyx_t_10);
13020  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13021  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13022  __pyx_t_8 = NULL;
13023  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
13024  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
13025  if (likely(__pyx_t_8)) {
13026  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
13027  __Pyx_INCREF(__pyx_t_8);
13028  __Pyx_INCREF(function);
13029  __Pyx_DECREF_SET(__pyx_t_1, function);
13030  }
13031  }
13032  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_10));
13033  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13034  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
13035  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error)
13036  __Pyx_GOTREF(__pyx_t_3);
13037  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13038  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error)
13039  __Pyx_GOTREF(__pyx_t_1);
13040  __Pyx_GIVEREF(__pyx_t_3);
13041  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
13042  __pyx_t_3 = 0;
13043  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementChildrenOffsetsList, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error)
13044  __Pyx_GOTREF(__pyx_t_3);
13045  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13046  __Pyx_GIVEREF(__pyx_t_3);
13047  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13048  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13049  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_3);
13050  __pyx_t_3 = 0;
13051 
13052  /* "cmeshTools.pyx":288
13053  * self.elementChildrenArrayList = []
13054  * self.elementChildrenOffsetsList = []
13055  * for n in range(1, self.multilevelMesh.nLevels): # <<<<<<<<<<<<<<
13056  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
13057  * dim = self.multilevelMesh.meshArray[n].nElements_global
13058  */
13059  }
13060  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13061 
13062  /* "cmeshTools.pyx":282
13063  * False);
13064  *
13065  * def buildPythonMultilevelMeshInterface(self): # <<<<<<<<<<<<<<
13066  * cdef int dim
13067  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
13068  */
13069 
13070  /* function exit code */
13071  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13072  goto __pyx_L0;
13073  __pyx_L1_error:;
13074  __Pyx_XDECREF(__pyx_t_1);
13075  __Pyx_XDECREF(__pyx_t_2);
13076  __Pyx_XDECREF(__pyx_t_3);
13077  __Pyx_XDECREF(__pyx_t_8);
13078  __Pyx_XDECREF(((PyObject *)__pyx_t_10));
13079  __Pyx_XDECREF(__pyx_t_11);
13080  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.buildPythonMultilevelMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
13081  __pyx_r = NULL;
13082  __pyx_L0:;
13083  __Pyx_XDECREF(__pyx_v_n);
13084  __Pyx_XGIVEREF(__pyx_r);
13085  __Pyx_RefNannyFinishContext();
13086  return __pyx_r;
13087 }
13088 
13089 /* "cmeshTools.pyx":202
13090  * cdef cppm.MultilevelMesh multilevelMesh
13091  * cdef public:
13092  * int nLevels # <<<<<<<<<<<<<<
13093  * list cmeshList
13094  * list elementParentsArrayList
13095  */
13096 
13097 /* Python wrapper */
13098 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(PyObject *__pyx_v_self); /*proto*/
13099 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(PyObject *__pyx_v_self) {
13100  PyObject *__pyx_r = 0;
13101  __Pyx_RefNannyDeclarations
13102  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13103  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13104 
13105  /* function exit code */
13106  __Pyx_RefNannyFinishContext();
13107  return __pyx_r;
13108 }
13109 
13110 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13111  PyObject *__pyx_r = NULL;
13112  __Pyx_RefNannyDeclarations
13113  PyObject *__pyx_t_1 = NULL;
13114  __Pyx_RefNannySetupContext("__get__", 0);
13115  __Pyx_XDECREF(__pyx_r);
13116  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error)
13117  __Pyx_GOTREF(__pyx_t_1);
13118  __pyx_r = __pyx_t_1;
13119  __pyx_t_1 = 0;
13120  goto __pyx_L0;
13121 
13122  /* function exit code */
13123  __pyx_L1_error:;
13124  __Pyx_XDECREF(__pyx_t_1);
13125  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.nLevels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13126  __pyx_r = NULL;
13127  __pyx_L0:;
13128  __Pyx_XGIVEREF(__pyx_r);
13129  __Pyx_RefNannyFinishContext();
13130  return __pyx_r;
13131 }
13132 
13133 /* Python wrapper */
13134 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13135 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13136  int __pyx_r;
13137  __Pyx_RefNannyDeclarations
13138  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13139  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13140 
13141  /* function exit code */
13142  __Pyx_RefNannyFinishContext();
13143  return __pyx_r;
13144 }
13145 
13146 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13147  int __pyx_r;
13148  __Pyx_RefNannyDeclarations
13149  int __pyx_t_1;
13150  __Pyx_RefNannySetupContext("__set__", 0);
13151  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 202, __pyx_L1_error)
13152  __pyx_v_self->nLevels = __pyx_t_1;
13153 
13154  /* function exit code */
13155  __pyx_r = 0;
13156  goto __pyx_L0;
13157  __pyx_L1_error:;
13158  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.nLevels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13159  __pyx_r = -1;
13160  __pyx_L0:;
13161  __Pyx_RefNannyFinishContext();
13162  return __pyx_r;
13163 }
13164 
13165 /* "cmeshTools.pyx":203
13166  * cdef public:
13167  * int nLevels
13168  * list cmeshList # <<<<<<<<<<<<<<
13169  * list elementParentsArrayList
13170  * list elementChildrenArrayList
13171  */
13172 
13173 /* Python wrapper */
13174 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(PyObject *__pyx_v_self); /*proto*/
13175 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(PyObject *__pyx_v_self) {
13176  PyObject *__pyx_r = 0;
13177  __Pyx_RefNannyDeclarations
13178  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13179  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13180 
13181  /* function exit code */
13182  __Pyx_RefNannyFinishContext();
13183  return __pyx_r;
13184 }
13185 
13186 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13187  PyObject *__pyx_r = NULL;
13188  __Pyx_RefNannyDeclarations
13189  __Pyx_RefNannySetupContext("__get__", 0);
13190  __Pyx_XDECREF(__pyx_r);
13191  __Pyx_INCREF(__pyx_v_self->cmeshList);
13192  __pyx_r = __pyx_v_self->cmeshList;
13193  goto __pyx_L0;
13194 
13195  /* function exit code */
13196  __pyx_L0:;
13197  __Pyx_XGIVEREF(__pyx_r);
13198  __Pyx_RefNannyFinishContext();
13199  return __pyx_r;
13200 }
13201 
13202 /* Python wrapper */
13203 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13204 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13205  int __pyx_r;
13206  __Pyx_RefNannyDeclarations
13207  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13208  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13209 
13210  /* function exit code */
13211  __Pyx_RefNannyFinishContext();
13212  return __pyx_r;
13213 }
13214 
13215 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13216  int __pyx_r;
13217  __Pyx_RefNannyDeclarations
13218  PyObject *__pyx_t_1 = NULL;
13219  __Pyx_RefNannySetupContext("__set__", 0);
13220  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 203, __pyx_L1_error)
13221  __pyx_t_1 = __pyx_v_value;
13222  __Pyx_INCREF(__pyx_t_1);
13223  __Pyx_GIVEREF(__pyx_t_1);
13224  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13225  __Pyx_DECREF(__pyx_v_self->cmeshList);
13226  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_1);
13227  __pyx_t_1 = 0;
13228 
13229  /* function exit code */
13230  __pyx_r = 0;
13231  goto __pyx_L0;
13232  __pyx_L1_error:;
13233  __Pyx_XDECREF(__pyx_t_1);
13234  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.cmeshList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13235  __pyx_r = -1;
13236  __pyx_L0:;
13237  __Pyx_RefNannyFinishContext();
13238  return __pyx_r;
13239 }
13240 
13241 /* Python wrapper */
13242 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(PyObject *__pyx_v_self); /*proto*/
13243 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(PyObject *__pyx_v_self) {
13244  int __pyx_r;
13245  __Pyx_RefNannyDeclarations
13246  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13247  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13248 
13249  /* function exit code */
13250  __Pyx_RefNannyFinishContext();
13251  return __pyx_r;
13252 }
13253 
13254 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13255  int __pyx_r;
13256  __Pyx_RefNannyDeclarations
13257  __Pyx_RefNannySetupContext("__del__", 0);
13258  __Pyx_INCREF(Py_None);
13259  __Pyx_GIVEREF(Py_None);
13260  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13261  __Pyx_DECREF(__pyx_v_self->cmeshList);
13262  __pyx_v_self->cmeshList = ((PyObject*)Py_None);
13263 
13264  /* function exit code */
13265  __pyx_r = 0;
13266  __Pyx_RefNannyFinishContext();
13267  return __pyx_r;
13268 }
13269 
13270 /* "cmeshTools.pyx":204
13271  * int nLevels
13272  * list cmeshList
13273  * list elementParentsArrayList # <<<<<<<<<<<<<<
13274  * list elementChildrenArrayList
13275  * list elementChildrenOffsetsList
13276  */
13277 
13278 /* Python wrapper */
13279 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(PyObject *__pyx_v_self); /*proto*/
13280 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(PyObject *__pyx_v_self) {
13281  PyObject *__pyx_r = 0;
13282  __Pyx_RefNannyDeclarations
13283  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13284  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13285 
13286  /* function exit code */
13287  __Pyx_RefNannyFinishContext();
13288  return __pyx_r;
13289 }
13290 
13291 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13292  PyObject *__pyx_r = NULL;
13293  __Pyx_RefNannyDeclarations
13294  __Pyx_RefNannySetupContext("__get__", 0);
13295  __Pyx_XDECREF(__pyx_r);
13296  __Pyx_INCREF(__pyx_v_self->elementParentsArrayList);
13297  __pyx_r = __pyx_v_self->elementParentsArrayList;
13298  goto __pyx_L0;
13299 
13300  /* function exit code */
13301  __pyx_L0:;
13302  __Pyx_XGIVEREF(__pyx_r);
13303  __Pyx_RefNannyFinishContext();
13304  return __pyx_r;
13305 }
13306 
13307 /* Python wrapper */
13308 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13309 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13310  int __pyx_r;
13311  __Pyx_RefNannyDeclarations
13312  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13313  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13314 
13315  /* function exit code */
13316  __Pyx_RefNannyFinishContext();
13317  return __pyx_r;
13318 }
13319 
13320 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13321  int __pyx_r;
13322  __Pyx_RefNannyDeclarations
13323  PyObject *__pyx_t_1 = NULL;
13324  __Pyx_RefNannySetupContext("__set__", 0);
13325  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 204, __pyx_L1_error)
13326  __pyx_t_1 = __pyx_v_value;
13327  __Pyx_INCREF(__pyx_t_1);
13328  __Pyx_GIVEREF(__pyx_t_1);
13329  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13330  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13331  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_1);
13332  __pyx_t_1 = 0;
13333 
13334  /* function exit code */
13335  __pyx_r = 0;
13336  goto __pyx_L0;
13337  __pyx_L1_error:;
13338  __Pyx_XDECREF(__pyx_t_1);
13339  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementParentsArrayList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13340  __pyx_r = -1;
13341  __pyx_L0:;
13342  __Pyx_RefNannyFinishContext();
13343  return __pyx_r;
13344 }
13345 
13346 /* Python wrapper */
13347 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(PyObject *__pyx_v_self); /*proto*/
13348 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(PyObject *__pyx_v_self) {
13349  int __pyx_r;
13350  __Pyx_RefNannyDeclarations
13351  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13352  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13353 
13354  /* function exit code */
13355  __Pyx_RefNannyFinishContext();
13356  return __pyx_r;
13357 }
13358 
13359 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13360  int __pyx_r;
13361  __Pyx_RefNannyDeclarations
13362  __Pyx_RefNannySetupContext("__del__", 0);
13363  __Pyx_INCREF(Py_None);
13364  __Pyx_GIVEREF(Py_None);
13365  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13366  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13367  __pyx_v_self->elementParentsArrayList = ((PyObject*)Py_None);
13368 
13369  /* function exit code */
13370  __pyx_r = 0;
13371  __Pyx_RefNannyFinishContext();
13372  return __pyx_r;
13373 }
13374 
13375 /* "cmeshTools.pyx":205
13376  * list cmeshList
13377  * list elementParentsArrayList
13378  * list elementChildrenArrayList # <<<<<<<<<<<<<<
13379  * list elementChildrenOffsetsList
13380  * def __init__(self, CMesh cmesh, nLevels):
13381  */
13382 
13383 /* Python wrapper */
13384 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(PyObject *__pyx_v_self); /*proto*/
13385 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(PyObject *__pyx_v_self) {
13386  PyObject *__pyx_r = 0;
13387  __Pyx_RefNannyDeclarations
13388  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13389  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13390 
13391  /* function exit code */
13392  __Pyx_RefNannyFinishContext();
13393  return __pyx_r;
13394 }
13395 
13396 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13397  PyObject *__pyx_r = NULL;
13398  __Pyx_RefNannyDeclarations
13399  __Pyx_RefNannySetupContext("__get__", 0);
13400  __Pyx_XDECREF(__pyx_r);
13401  __Pyx_INCREF(__pyx_v_self->elementChildrenArrayList);
13402  __pyx_r = __pyx_v_self->elementChildrenArrayList;
13403  goto __pyx_L0;
13404 
13405  /* function exit code */
13406  __pyx_L0:;
13407  __Pyx_XGIVEREF(__pyx_r);
13408  __Pyx_RefNannyFinishContext();
13409  return __pyx_r;
13410 }
13411 
13412 /* Python wrapper */
13413 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13414 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13415  int __pyx_r;
13416  __Pyx_RefNannyDeclarations
13417  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13418  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13419 
13420  /* function exit code */
13421  __Pyx_RefNannyFinishContext();
13422  return __pyx_r;
13423 }
13424 
13425 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13426  int __pyx_r;
13427  __Pyx_RefNannyDeclarations
13428  PyObject *__pyx_t_1 = NULL;
13429  __Pyx_RefNannySetupContext("__set__", 0);
13430  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 205, __pyx_L1_error)
13431  __pyx_t_1 = __pyx_v_value;
13432  __Pyx_INCREF(__pyx_t_1);
13433  __Pyx_GIVEREF(__pyx_t_1);
13434  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13435  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13436  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_1);
13437  __pyx_t_1 = 0;
13438 
13439  /* function exit code */
13440  __pyx_r = 0;
13441  goto __pyx_L0;
13442  __pyx_L1_error:;
13443  __Pyx_XDECREF(__pyx_t_1);
13444  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementChildrenArrayList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13445  __pyx_r = -1;
13446  __pyx_L0:;
13447  __Pyx_RefNannyFinishContext();
13448  return __pyx_r;
13449 }
13450 
13451 /* Python wrapper */
13452 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(PyObject *__pyx_v_self); /*proto*/
13453 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(PyObject *__pyx_v_self) {
13454  int __pyx_r;
13455  __Pyx_RefNannyDeclarations
13456  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13457  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13458 
13459  /* function exit code */
13460  __Pyx_RefNannyFinishContext();
13461  return __pyx_r;
13462 }
13463 
13464 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13465  int __pyx_r;
13466  __Pyx_RefNannyDeclarations
13467  __Pyx_RefNannySetupContext("__del__", 0);
13468  __Pyx_INCREF(Py_None);
13469  __Pyx_GIVEREF(Py_None);
13470  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13471  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13472  __pyx_v_self->elementChildrenArrayList = ((PyObject*)Py_None);
13473 
13474  /* function exit code */
13475  __pyx_r = 0;
13476  __Pyx_RefNannyFinishContext();
13477  return __pyx_r;
13478 }
13479 
13480 /* "cmeshTools.pyx":206
13481  * list elementParentsArrayList
13482  * list elementChildrenArrayList
13483  * list elementChildrenOffsetsList # <<<<<<<<<<<<<<
13484  * def __init__(self, CMesh cmesh, nLevels):
13485  * self.multilevelMesh = cppm.MultilevelMesh()
13486  */
13487 
13488 /* Python wrapper */
13489 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(PyObject *__pyx_v_self); /*proto*/
13490 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(PyObject *__pyx_v_self) {
13491  PyObject *__pyx_r = 0;
13492  __Pyx_RefNannyDeclarations
13493  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13494  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13495 
13496  /* function exit code */
13497  __Pyx_RefNannyFinishContext();
13498  return __pyx_r;
13499 }
13500 
13501 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13502  PyObject *__pyx_r = NULL;
13503  __Pyx_RefNannyDeclarations
13504  __Pyx_RefNannySetupContext("__get__", 0);
13505  __Pyx_XDECREF(__pyx_r);
13506  __Pyx_INCREF(__pyx_v_self->elementChildrenOffsetsList);
13507  __pyx_r = __pyx_v_self->elementChildrenOffsetsList;
13508  goto __pyx_L0;
13509 
13510  /* function exit code */
13511  __pyx_L0:;
13512  __Pyx_XGIVEREF(__pyx_r);
13513  __Pyx_RefNannyFinishContext();
13514  return __pyx_r;
13515 }
13516 
13517 /* Python wrapper */
13518 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13519 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13520  int __pyx_r;
13521  __Pyx_RefNannyDeclarations
13522  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13523  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13524 
13525  /* function exit code */
13526  __Pyx_RefNannyFinishContext();
13527  return __pyx_r;
13528 }
13529 
13530 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13531  int __pyx_r;
13532  __Pyx_RefNannyDeclarations
13533  PyObject *__pyx_t_1 = NULL;
13534  __Pyx_RefNannySetupContext("__set__", 0);
13535  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 206, __pyx_L1_error)
13536  __pyx_t_1 = __pyx_v_value;
13537  __Pyx_INCREF(__pyx_t_1);
13538  __Pyx_GIVEREF(__pyx_t_1);
13539  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13540  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13541  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_1);
13542  __pyx_t_1 = 0;
13543 
13544  /* function exit code */
13545  __pyx_r = 0;
13546  goto __pyx_L0;
13547  __pyx_L1_error:;
13548  __Pyx_XDECREF(__pyx_t_1);
13549  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementChildrenOffsetsList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13550  __pyx_r = -1;
13551  __pyx_L0:;
13552  __Pyx_RefNannyFinishContext();
13553  return __pyx_r;
13554 }
13555 
13556 /* Python wrapper */
13557 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(PyObject *__pyx_v_self); /*proto*/
13558 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(PyObject *__pyx_v_self) {
13559  int __pyx_r;
13560  __Pyx_RefNannyDeclarations
13561  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13562  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13563 
13564  /* function exit code */
13565  __Pyx_RefNannyFinishContext();
13566  return __pyx_r;
13567 }
13568 
13569 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13570  int __pyx_r;
13571  __Pyx_RefNannyDeclarations
13572  __Pyx_RefNannySetupContext("__del__", 0);
13573  __Pyx_INCREF(Py_None);
13574  __Pyx_GIVEREF(Py_None);
13575  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13576  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13577  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)Py_None);
13578 
13579  /* function exit code */
13580  __pyx_r = 0;
13581  __Pyx_RefNannyFinishContext();
13582  return __pyx_r;
13583 }
13584 
13585 /* "(tree fragment)":1
13586  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13587  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13588  * def __setstate_cython__(self, __pyx_state):
13589  */
13590 
13591 /* Python wrapper */
13592 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13593 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13594  PyObject *__pyx_r = 0;
13595  __Pyx_RefNannyDeclarations
13596  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
13597  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13598 
13599  /* function exit code */
13600  __Pyx_RefNannyFinishContext();
13601  return __pyx_r;
13602 }
13603 
13604 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13605  PyObject *__pyx_r = NULL;
13606  __Pyx_RefNannyDeclarations
13607  PyObject *__pyx_t_1 = NULL;
13608  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
13609 
13610  /* "(tree fragment)":2
13611  * def __reduce_cython__(self):
13612  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
13613  * def __setstate_cython__(self, __pyx_state):
13614  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13615  */
13616  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
13617  __Pyx_GOTREF(__pyx_t_1);
13618  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13619  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13620  __PYX_ERR(0, 2, __pyx_L1_error)
13621 
13622  /* "(tree fragment)":1
13623  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13624  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13625  * def __setstate_cython__(self, __pyx_state):
13626  */
13627 
13628  /* function exit code */
13629  __pyx_L1_error:;
13630  __Pyx_XDECREF(__pyx_t_1);
13631  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13632  __pyx_r = NULL;
13633  __Pyx_XGIVEREF(__pyx_r);
13634  __Pyx_RefNannyFinishContext();
13635  return __pyx_r;
13636 }
13637 
13638 /* "(tree fragment)":3
13639  * def __reduce_cython__(self):
13640  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13641  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13642  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13643  */
13644 
13645 /* Python wrapper */
13646 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
13647 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
13648  PyObject *__pyx_r = 0;
13649  __Pyx_RefNannyDeclarations
13650  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
13651  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
13652 
13653  /* function exit code */
13654  __Pyx_RefNannyFinishContext();
13655  return __pyx_r;
13656 }
13657 
13658 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
13659  PyObject *__pyx_r = NULL;
13660  __Pyx_RefNannyDeclarations
13661  PyObject *__pyx_t_1 = NULL;
13662  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
13663 
13664  /* "(tree fragment)":4
13665  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13666  * def __setstate_cython__(self, __pyx_state):
13667  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
13668  */
13669  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
13670  __Pyx_GOTREF(__pyx_t_1);
13671  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13672  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13673  __PYX_ERR(0, 4, __pyx_L1_error)
13674 
13675  /* "(tree fragment)":3
13676  * def __reduce_cython__(self):
13677  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13678  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13679  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13680  */
13681 
13682  /* function exit code */
13683  __pyx_L1_error:;
13684  __Pyx_XDECREF(__pyx_t_1);
13685  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13686  __pyx_r = NULL;
13687  __Pyx_XGIVEREF(__pyx_r);
13688  __Pyx_RefNannyFinishContext();
13689  return __pyx_r;
13690 }
13691 
13692 /* "cmeshTools.pyx":297
13693  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
13694  *
13695  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
13696  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13697  * return (cmultilevelMesh.nLevels,
13698  */
13699 
13700 /* Python wrapper */
13701 static PyObject *__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh); /*proto*/
13702 static PyMethodDef __pyx_mdef_10cmeshTools_5buildPythonMultilevelMeshInterface = {"buildPythonMultilevelMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface, METH_O, 0};
13703 static PyObject *__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh) {
13704  PyObject *__pyx_r = 0;
13705  __Pyx_RefNannyDeclarations
13706  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface (wrapper)", 0);
13707  __pyx_r = __pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(__pyx_self, ((PyObject *)__pyx_v_cmultilevelMesh));
13708 
13709  /* function exit code */
13710  __Pyx_RefNannyFinishContext();
13711  return __pyx_r;
13712 }
13713 
13714 static PyObject *__pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh) {
13715  PyObject *__pyx_r = NULL;
13716  __Pyx_RefNannyDeclarations
13717  PyObject *__pyx_t_1 = NULL;
13718  PyObject *__pyx_t_2 = NULL;
13719  PyObject *__pyx_t_3 = NULL;
13720  PyObject *__pyx_t_4 = NULL;
13721  PyObject *__pyx_t_5 = NULL;
13722  PyObject *__pyx_t_6 = NULL;
13723  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface", 0);
13724 
13725  /* "cmeshTools.pyx":298
13726  *
13727  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
13728  * cmultilevelMesh.buildPythonMultilevelMeshInterface() # <<<<<<<<<<<<<<
13729  * return (cmultilevelMesh.nLevels,
13730  * cmultilevelMesh.cmeshList,
13731  */
13732  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_buildPythonMultilevelMeshInterfa); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 298, __pyx_L1_error)
13733  __Pyx_GOTREF(__pyx_t_2);
13734  __pyx_t_3 = NULL;
13735  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13736  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
13737  if (likely(__pyx_t_3)) {
13738  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13739  __Pyx_INCREF(__pyx_t_3);
13740  __Pyx_INCREF(function);
13741  __Pyx_DECREF_SET(__pyx_t_2, function);
13742  }
13743  }
13744  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
13745  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13746  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 298, __pyx_L1_error)
13747  __Pyx_GOTREF(__pyx_t_1);
13748  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13749  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13750 
13751  /* "cmeshTools.pyx":299
13752  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
13753  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13754  * return (cmultilevelMesh.nLevels, # <<<<<<<<<<<<<<
13755  * cmultilevelMesh.cmeshList,
13756  * cmultilevelMesh.elementParentsArrayList,
13757  */
13758  __Pyx_XDECREF(__pyx_r);
13759  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_nLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L1_error)
13760  __Pyx_GOTREF(__pyx_t_1);
13761 
13762  /* "cmeshTools.pyx":300
13763  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13764  * return (cmultilevelMesh.nLevels,
13765  * cmultilevelMesh.cmeshList, # <<<<<<<<<<<<<<
13766  * cmultilevelMesh.elementParentsArrayList,
13767  * cmultilevelMesh.elementChildrenArrayList,
13768  */
13769  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_cmeshList); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 300, __pyx_L1_error)
13770  __Pyx_GOTREF(__pyx_t_2);
13771 
13772  /* "cmeshTools.pyx":301
13773  * return (cmultilevelMesh.nLevels,
13774  * cmultilevelMesh.cmeshList,
13775  * cmultilevelMesh.elementParentsArrayList, # <<<<<<<<<<<<<<
13776  * cmultilevelMesh.elementChildrenArrayList,
13777  * cmultilevelMesh.elementChildrenOffsetsList)
13778  */
13779  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementParentsArrayList); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 301, __pyx_L1_error)
13780  __Pyx_GOTREF(__pyx_t_3);
13781 
13782  /* "cmeshTools.pyx":302
13783  * cmultilevelMesh.cmeshList,
13784  * cmultilevelMesh.elementParentsArrayList,
13785  * cmultilevelMesh.elementChildrenArrayList, # <<<<<<<<<<<<<<
13786  * cmultilevelMesh.elementChildrenOffsetsList)
13787  *
13788  */
13789  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementChildrenArrayList); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 302, __pyx_L1_error)
13790  __Pyx_GOTREF(__pyx_t_4);
13791 
13792  /* "cmeshTools.pyx":303
13793  * cmultilevelMesh.elementParentsArrayList,
13794  * cmultilevelMesh.elementChildrenArrayList,
13795  * cmultilevelMesh.elementChildrenOffsetsList) # <<<<<<<<<<<<<<
13796  *
13797  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx,
13798  */
13799  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementChildrenOffsetsList); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 303, __pyx_L1_error)
13800  __Pyx_GOTREF(__pyx_t_5);
13801 
13802  /* "cmeshTools.pyx":299
13803  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
13804  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13805  * return (cmultilevelMesh.nLevels, # <<<<<<<<<<<<<<
13806  * cmultilevelMesh.cmeshList,
13807  * cmultilevelMesh.elementParentsArrayList,
13808  */
13809  __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 299, __pyx_L1_error)
13810  __Pyx_GOTREF(__pyx_t_6);
13811  __Pyx_GIVEREF(__pyx_t_1);
13812  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
13813  __Pyx_GIVEREF(__pyx_t_2);
13814  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
13815  __Pyx_GIVEREF(__pyx_t_3);
13816  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
13817  __Pyx_GIVEREF(__pyx_t_4);
13818  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4);
13819  __Pyx_GIVEREF(__pyx_t_5);
13820  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_5);
13821  __pyx_t_1 = 0;
13822  __pyx_t_2 = 0;
13823  __pyx_t_3 = 0;
13824  __pyx_t_4 = 0;
13825  __pyx_t_5 = 0;
13826  __pyx_r = __pyx_t_6;
13827  __pyx_t_6 = 0;
13828  goto __pyx_L0;
13829 
13830  /* "cmeshTools.pyx":297
13831  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
13832  *
13833  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
13834  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13835  * return (cmultilevelMesh.nLevels,
13836  */
13837 
13838  /* function exit code */
13839  __pyx_L1_error:;
13840  __Pyx_XDECREF(__pyx_t_1);
13841  __Pyx_XDECREF(__pyx_t_2);
13842  __Pyx_XDECREF(__pyx_t_3);
13843  __Pyx_XDECREF(__pyx_t_4);
13844  __Pyx_XDECREF(__pyx_t_5);
13845  __Pyx_XDECREF(__pyx_t_6);
13846  __Pyx_AddTraceback("cmeshTools.buildPythonMultilevelMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
13847  __pyx_r = NULL;
13848  __pyx_L0:;
13849  __Pyx_XGIVEREF(__pyx_r);
13850  __Pyx_RefNannyFinishContext();
13851  return __pyx_r;
13852 }
13853 
13854 /* "cmeshTools.pyx":305
13855  * cmultilevelMesh.elementChildrenOffsetsList)
13856  *
13857  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
13858  * int ny,
13859  * int nz,
13860  */
13861 
13862 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13863 static void __pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
13864  __Pyx_RefNannyDeclarations
13865  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid", 0);
13866 
13867  /* "cmeshTools.pyx":312
13868  * double Lz,
13869  * CMesh cmesh):
13870  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh); # <<<<<<<<<<<<<<
13871  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
13872  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
13873  */
13874  (void)(regularHexahedralToTetrahedralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_cmesh->mesh));
13875 
13876  /* "cmeshTools.pyx":313
13877  * CMesh cmesh):
13878  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh);
13879  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
13880  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
13881  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
13882  */
13883  (void)(regularHexahedralToTetrahedralMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
13884 
13885  /* "cmeshTools.pyx":314
13886  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh);
13887  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
13888  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
13889  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
13890  *
13891  */
13892  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
13893 
13894  /* "cmeshTools.pyx":315
13895  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
13896  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
13897  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
13898  *
13899  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh):
13900  */
13901  (void)(regularHexahedralToTetrahedralElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
13902 
13903  /* "cmeshTools.pyx":305
13904  * cmultilevelMesh.elementChildrenOffsetsList)
13905  *
13906  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
13907  * int ny,
13908  * int nz,
13909  */
13910 
13911  /* function exit code */
13912  __Pyx_RefNannyFinishContext();
13913 }
13914 
13915 /* Python wrapper */
13916 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13917 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13918  int __pyx_v_nx;
13919  int __pyx_v_ny;
13920  int __pyx_v_nz;
13921  double __pyx_v_Lx;
13922  double __pyx_v_Ly;
13923  double __pyx_v_Lz;
13924  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
13925  PyObject *__pyx_r = 0;
13926  __Pyx_RefNannyDeclarations
13927  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid (wrapper)", 0);
13928  {
13929  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_Lz,&__pyx_n_s_cmesh,0};
13930  PyObject* values[7] = {0,0,0,0,0,0,0};
13931  if (unlikely(__pyx_kwds)) {
13932  Py_ssize_t kw_args;
13933  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13934  switch (pos_args) {
13935  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13936  CYTHON_FALLTHROUGH;
13937  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13938  CYTHON_FALLTHROUGH;
13939  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13940  CYTHON_FALLTHROUGH;
13941  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13942  CYTHON_FALLTHROUGH;
13943  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13944  CYTHON_FALLTHROUGH;
13945  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13946  CYTHON_FALLTHROUGH;
13947  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13948  CYTHON_FALLTHROUGH;
13949  case 0: break;
13950  default: goto __pyx_L5_argtuple_error;
13951  }
13952  kw_args = PyDict_Size(__pyx_kwds);
13953  switch (pos_args) {
13954  case 0:
13955  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
13956  else goto __pyx_L5_argtuple_error;
13957  CYTHON_FALLTHROUGH;
13958  case 1:
13959  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
13960  else {
13961  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 1); __PYX_ERR(1, 305, __pyx_L3_error)
13962  }
13963  CYTHON_FALLTHROUGH;
13964  case 2:
13965  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--;
13966  else {
13967  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 2); __PYX_ERR(1, 305, __pyx_L3_error)
13968  }
13969  CYTHON_FALLTHROUGH;
13970  case 3:
13971  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
13972  else {
13973  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 3); __PYX_ERR(1, 305, __pyx_L3_error)
13974  }
13975  CYTHON_FALLTHROUGH;
13976  case 4:
13977  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
13978  else {
13979  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 4); __PYX_ERR(1, 305, __pyx_L3_error)
13980  }
13981  CYTHON_FALLTHROUGH;
13982  case 5:
13983  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lz)) != 0)) kw_args--;
13984  else {
13985  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 5); __PYX_ERR(1, 305, __pyx_L3_error)
13986  }
13987  CYTHON_FALLTHROUGH;
13988  case 6:
13989  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
13990  else {
13991  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 6); __PYX_ERR(1, 305, __pyx_L3_error)
13992  }
13993  }
13994  if (unlikely(kw_args > 0)) {
13995  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateTetrahedralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 305, __pyx_L3_error)
13996  }
13997  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
13998  goto __pyx_L5_argtuple_error;
13999  } else {
14000  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14001  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14002  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14003  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14004  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14005  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14006  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
14007  }
14008  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 305, __pyx_L3_error)
14009  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 306, __pyx_L3_error)
14010  __pyx_v_nz = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 307, __pyx_L3_error)
14011  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 308, __pyx_L3_error)
14012  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 309, __pyx_L3_error)
14013  __pyx_v_Lz = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_Lz == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 310, __pyx_L3_error)
14014  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[6]);
14015  }
14016  goto __pyx_L4_argument_unpacking_done;
14017  __pyx_L5_argtuple_error:;
14018  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 305, __pyx_L3_error)
14019  __pyx_L3_error:;
14020  __Pyx_AddTraceback("cmeshTools.generateTetrahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
14021  __Pyx_RefNannyFinishContext();
14022  return NULL;
14023  __pyx_L4_argument_unpacking_done:;
14024  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 311, __pyx_L1_error)
14025  __pyx_r = __pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh);
14026 
14027  /* function exit code */
14028  goto __pyx_L0;
14029  __pyx_L1_error:;
14030  __pyx_r = NULL;
14031  __pyx_L0:;
14032  __Pyx_RefNannyFinishContext();
14033  return __pyx_r;
14034 }
14035 
14036 static PyObject *__pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
14037  PyObject *__pyx_r = NULL;
14038  __Pyx_RefNannyDeclarations
14039  PyObject *__pyx_t_1 = NULL;
14040  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid", 0);
14041  __Pyx_XDECREF(__pyx_r);
14042  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 305, __pyx_L1_error)
14043  __Pyx_GOTREF(__pyx_t_1);
14044  __pyx_r = __pyx_t_1;
14045  __pyx_t_1 = 0;
14046  goto __pyx_L0;
14047 
14048  /* function exit code */
14049  __pyx_L1_error:;
14050  __Pyx_XDECREF(__pyx_t_1);
14051  __Pyx_AddTraceback("cmeshTools.generateTetrahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
14052  __pyx_r = NULL;
14053  __pyx_L0:;
14054  __Pyx_XGIVEREF(__pyx_r);
14055  __Pyx_RefNannyFinishContext();
14056  return __pyx_r;
14057 }
14058 
14059 /* "cmeshTools.pyx":317
14060  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14061  *
14062  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
14063  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh)
14064  *
14065  */
14066 
14067 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
14068 static void __pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
14069  __Pyx_RefNannyDeclarations
14070  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron", 0);
14071 
14072  /* "cmeshTools.pyx":318
14073  *
14074  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh):
14075  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh) # <<<<<<<<<<<<<<
14076  *
14077  * # cdef static void cmeshToolsLocallyRefineMultilevelMesh(CMultilevelMesh cmesh,
14078  */
14079  (void)(computeGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
14080 
14081  /* "cmeshTools.pyx":317
14082  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14083  *
14084  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
14085  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh)
14086  *
14087  */
14088 
14089  /* function exit code */
14090  __Pyx_RefNannyFinishContext();
14091 }
14092 
14093 /* Python wrapper */
14094 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
14095 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
14096  PyObject *__pyx_r = 0;
14097  __Pyx_RefNannyDeclarations
14098  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron (wrapper)", 0);
14099  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 317, __pyx_L1_error)
14100  __pyx_r = __pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
14101 
14102  /* function exit code */
14103  goto __pyx_L0;
14104  __pyx_L1_error:;
14105  __pyx_r = NULL;
14106  __pyx_L0:;
14107  __Pyx_RefNannyFinishContext();
14108  return __pyx_r;
14109 }
14110 
14111 static PyObject *__pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
14112  PyObject *__pyx_r = NULL;
14113  __Pyx_RefNannyDeclarations
14114  PyObject *__pyx_t_1 = NULL;
14115  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron", 0);
14116  __Pyx_XDECREF(__pyx_r);
14117  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error)
14118  __Pyx_GOTREF(__pyx_t_1);
14119  __pyx_r = __pyx_t_1;
14120  __pyx_t_1 = 0;
14121  goto __pyx_L0;
14122 
14123  /* function exit code */
14124  __pyx_L1_error:;
14125  __Pyx_XDECREF(__pyx_t_1);
14126  __Pyx_AddTraceback("cmeshTools.cmeshToolsComputeGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
14127  __pyx_r = NULL;
14128  __pyx_L0:;
14129  __Pyx_XGIVEREF(__pyx_r);
14130  __Pyx_RefNannyFinishContext();
14131  return __pyx_r;
14132 }
14133 
14134 /* "cmeshTools.pyx":323
14135  *
14136  *
14137  * cpdef void generateFromTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14138  * unicode filebase,
14139  * int base):
14140  */
14141 
14142 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14143 static void __pyx_f_10cmeshTools_generateFromTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14144  CYTHON_UNUSED int __pyx_v_failed;
14145  __Pyx_RefNannyDeclarations
14146  PyObject *__pyx_t_1 = NULL;
14147  char const *__pyx_t_2;
14148  char const *__pyx_t_3;
14149  __Pyx_RefNannySetupContext("generateFromTriangleFiles", 0);
14150 
14151  /* "cmeshTools.pyx":328
14152  *
14153  * cdef int failed
14154  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14155  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
14156  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14157  */
14158  if (unlikely(__pyx_v_filebase == Py_None)) {
14159  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14160  __PYX_ERR(1, 328, __pyx_L1_error)
14161  }
14162  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 328, __pyx_L1_error)
14163  __Pyx_GOTREF(__pyx_t_1);
14164  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 328, __pyx_L1_error)
14165  __pyx_v_failed = readTriangleMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14166  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14167 
14168  /* "cmeshTools.pyx":329
14169  * cdef int failed
14170  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14171  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
14172  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14173  *
14174  */
14175  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
14176 
14177  /* "cmeshTools.pyx":330
14178  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14179  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
14180  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14181  *
14182  * cpdef void writeTriangleFiles(CMesh cmesh,
14183  */
14184  if (unlikely(__pyx_v_filebase == Py_None)) {
14185  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14186  __PYX_ERR(1, 330, __pyx_L1_error)
14187  }
14188  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 330, __pyx_L1_error)
14189  __Pyx_GOTREF(__pyx_t_1);
14190  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 330, __pyx_L1_error)
14191  __pyx_v_failed = readTriangleElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14192  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14193 
14194  /* "cmeshTools.pyx":323
14195  *
14196  *
14197  * cpdef void generateFromTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14198  * unicode filebase,
14199  * int base):
14200  */
14201 
14202  /* function exit code */
14203  goto __pyx_L0;
14204  __pyx_L1_error:;
14205  __Pyx_XDECREF(__pyx_t_1);
14206  __Pyx_WriteUnraisable("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14207  __pyx_L0:;
14208  __Pyx_RefNannyFinishContext();
14209 }
14210 
14211 /* Python wrapper */
14212 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14213 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14214  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14215  PyObject *__pyx_v_filebase = 0;
14216  int __pyx_v_base;
14217  PyObject *__pyx_r = 0;
14218  __Pyx_RefNannyDeclarations
14219  __Pyx_RefNannySetupContext("generateFromTriangleFiles (wrapper)", 0);
14220  {
14221  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14222  PyObject* values[3] = {0,0,0};
14223  if (unlikely(__pyx_kwds)) {
14224  Py_ssize_t kw_args;
14225  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14226  switch (pos_args) {
14227  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14228  CYTHON_FALLTHROUGH;
14229  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14230  CYTHON_FALLTHROUGH;
14231  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14232  CYTHON_FALLTHROUGH;
14233  case 0: break;
14234  default: goto __pyx_L5_argtuple_error;
14235  }
14236  kw_args = PyDict_Size(__pyx_kwds);
14237  switch (pos_args) {
14238  case 0:
14239  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14240  else goto __pyx_L5_argtuple_error;
14241  CYTHON_FALLTHROUGH;
14242  case 1:
14243  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14244  else {
14245  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, 1); __PYX_ERR(1, 323, __pyx_L3_error)
14246  }
14247  CYTHON_FALLTHROUGH;
14248  case 2:
14249  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14250  else {
14251  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, 2); __PYX_ERR(1, 323, __pyx_L3_error)
14252  }
14253  }
14254  if (unlikely(kw_args > 0)) {
14255  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTriangleFiles") < 0)) __PYX_ERR(1, 323, __pyx_L3_error)
14256  }
14257  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14258  goto __pyx_L5_argtuple_error;
14259  } else {
14260  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14261  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14262  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14263  }
14264  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14265  __pyx_v_filebase = ((PyObject*)values[1]);
14266  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 325, __pyx_L3_error)
14267  }
14268  goto __pyx_L4_argument_unpacking_done;
14269  __pyx_L5_argtuple_error:;
14270  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 323, __pyx_L3_error)
14271  __pyx_L3_error:;
14272  __Pyx_AddTraceback("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14273  __Pyx_RefNannyFinishContext();
14274  return NULL;
14275  __pyx_L4_argument_unpacking_done:;
14276  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 323, __pyx_L1_error)
14277  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 324, __pyx_L1_error)
14278  __pyx_r = __pyx_pf_10cmeshTools_10generateFromTriangleFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14279 
14280  /* function exit code */
14281  goto __pyx_L0;
14282  __pyx_L1_error:;
14283  __pyx_r = NULL;
14284  __pyx_L0:;
14285  __Pyx_RefNannyFinishContext();
14286  return __pyx_r;
14287 }
14288 
14289 static PyObject *__pyx_pf_10cmeshTools_10generateFromTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14290  PyObject *__pyx_r = NULL;
14291  __Pyx_RefNannyDeclarations
14292  PyObject *__pyx_t_1 = NULL;
14293  __Pyx_RefNannySetupContext("generateFromTriangleFiles", 0);
14294  __Pyx_XDECREF(__pyx_r);
14295  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTriangleFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 323, __pyx_L1_error)
14296  __Pyx_GOTREF(__pyx_t_1);
14297  __pyx_r = __pyx_t_1;
14298  __pyx_t_1 = 0;
14299  goto __pyx_L0;
14300 
14301  /* function exit code */
14302  __pyx_L1_error:;
14303  __Pyx_XDECREF(__pyx_t_1);
14304  __Pyx_AddTraceback("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14305  __pyx_r = NULL;
14306  __pyx_L0:;
14307  __Pyx_XGIVEREF(__pyx_r);
14308  __Pyx_RefNannyFinishContext();
14309  return __pyx_r;
14310 }
14311 
14312 /* "cmeshTools.pyx":332
14313  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14314  *
14315  * cpdef void writeTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14316  * unicode filebase,
14317  * int base):
14318  */
14319 
14320 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14321 static void __pyx_f_10cmeshTools_writeTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14322  CYTHON_UNUSED int __pyx_v_failed;
14323  __Pyx_RefNannyDeclarations
14324  PyObject *__pyx_t_1 = NULL;
14325  char const *__pyx_t_2;
14326  __Pyx_RefNannySetupContext("writeTriangleFiles", 0);
14327 
14328  /* "cmeshTools.pyx":336
14329  * int base):
14330  * cdef int failed
14331  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14332  *
14333  * cpdef void generateFromTetgenFiles(CMesh cmesh,
14334  */
14335  if (unlikely(__pyx_v_filebase == Py_None)) {
14336  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14337  __PYX_ERR(1, 336, __pyx_L1_error)
14338  }
14339  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L1_error)
14340  __Pyx_GOTREF(__pyx_t_1);
14341  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error)
14342  __pyx_v_failed = writeTriangleMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14343  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14344 
14345  /* "cmeshTools.pyx":332
14346  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14347  *
14348  * cpdef void writeTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14349  * unicode filebase,
14350  * int base):
14351  */
14352 
14353  /* function exit code */
14354  goto __pyx_L0;
14355  __pyx_L1_error:;
14356  __Pyx_XDECREF(__pyx_t_1);
14357  __Pyx_WriteUnraisable("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14358  __pyx_L0:;
14359  __Pyx_RefNannyFinishContext();
14360 }
14361 
14362 /* Python wrapper */
14363 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14364 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14365  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14366  PyObject *__pyx_v_filebase = 0;
14367  int __pyx_v_base;
14368  PyObject *__pyx_r = 0;
14369  __Pyx_RefNannyDeclarations
14370  __Pyx_RefNannySetupContext("writeTriangleFiles (wrapper)", 0);
14371  {
14372  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14373  PyObject* values[3] = {0,0,0};
14374  if (unlikely(__pyx_kwds)) {
14375  Py_ssize_t kw_args;
14376  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14377  switch (pos_args) {
14378  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14379  CYTHON_FALLTHROUGH;
14380  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14381  CYTHON_FALLTHROUGH;
14382  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14383  CYTHON_FALLTHROUGH;
14384  case 0: break;
14385  default: goto __pyx_L5_argtuple_error;
14386  }
14387  kw_args = PyDict_Size(__pyx_kwds);
14388  switch (pos_args) {
14389  case 0:
14390  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14391  else goto __pyx_L5_argtuple_error;
14392  CYTHON_FALLTHROUGH;
14393  case 1:
14394  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14395  else {
14396  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, 1); __PYX_ERR(1, 332, __pyx_L3_error)
14397  }
14398  CYTHON_FALLTHROUGH;
14399  case 2:
14400  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14401  else {
14402  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, 2); __PYX_ERR(1, 332, __pyx_L3_error)
14403  }
14404  }
14405  if (unlikely(kw_args > 0)) {
14406  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeTriangleFiles") < 0)) __PYX_ERR(1, 332, __pyx_L3_error)
14407  }
14408  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14409  goto __pyx_L5_argtuple_error;
14410  } else {
14411  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14412  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14413  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14414  }
14415  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14416  __pyx_v_filebase = ((PyObject*)values[1]);
14417  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 334, __pyx_L3_error)
14418  }
14419  goto __pyx_L4_argument_unpacking_done;
14420  __pyx_L5_argtuple_error:;
14421  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 332, __pyx_L3_error)
14422  __pyx_L3_error:;
14423  __Pyx_AddTraceback("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14424  __Pyx_RefNannyFinishContext();
14425  return NULL;
14426  __pyx_L4_argument_unpacking_done:;
14427  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 332, __pyx_L1_error)
14428  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 333, __pyx_L1_error)
14429  __pyx_r = __pyx_pf_10cmeshTools_12writeTriangleFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14430 
14431  /* function exit code */
14432  goto __pyx_L0;
14433  __pyx_L1_error:;
14434  __pyx_r = NULL;
14435  __pyx_L0:;
14436  __Pyx_RefNannyFinishContext();
14437  return __pyx_r;
14438 }
14439 
14440 static PyObject *__pyx_pf_10cmeshTools_12writeTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14441  PyObject *__pyx_r = NULL;
14442  __Pyx_RefNannyDeclarations
14443  PyObject *__pyx_t_1 = NULL;
14444  __Pyx_RefNannySetupContext("writeTriangleFiles", 0);
14445  __Pyx_XDECREF(__pyx_r);
14446  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_writeTriangleFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 332, __pyx_L1_error)
14447  __Pyx_GOTREF(__pyx_t_1);
14448  __pyx_r = __pyx_t_1;
14449  __pyx_t_1 = 0;
14450  goto __pyx_L0;
14451 
14452  /* function exit code */
14453  __pyx_L1_error:;
14454  __Pyx_XDECREF(__pyx_t_1);
14455  __Pyx_AddTraceback("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14456  __pyx_r = NULL;
14457  __pyx_L0:;
14458  __Pyx_XGIVEREF(__pyx_r);
14459  __Pyx_RefNannyFinishContext();
14460  return __pyx_r;
14461 }
14462 
14463 /* "cmeshTools.pyx":338
14464  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14465  *
14466  * cpdef void generateFromTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14467  * unicode filebase,
14468  * int base):
14469  */
14470 
14471 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14472 static void __pyx_f_10cmeshTools_generateFromTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14473  CYTHON_UNUSED int __pyx_v_failed;
14474  __Pyx_RefNannyDeclarations
14475  PyObject *__pyx_t_1 = NULL;
14476  char const *__pyx_t_2;
14477  char const *__pyx_t_3;
14478  __Pyx_RefNannySetupContext("generateFromTetgenFiles", 0);
14479 
14480  /* "cmeshTools.pyx":342
14481  * int base):
14482  * cdef int failed
14483  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14484  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14485  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14486  */
14487  if (unlikely(__pyx_v_filebase == Py_None)) {
14488  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14489  __PYX_ERR(1, 342, __pyx_L1_error)
14490  }
14491  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 342, __pyx_L1_error)
14492  __Pyx_GOTREF(__pyx_t_1);
14493  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 342, __pyx_L1_error)
14494  __pyx_v_failed = readTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14495  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14496 
14497  /* "cmeshTools.pyx":343
14498  * cdef int failed
14499  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14500  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
14501  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14502  *
14503  */
14504  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
14505 
14506  /* "cmeshTools.pyx":344
14507  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14508  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14509  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14510  *
14511  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh,
14512  */
14513  if (unlikely(__pyx_v_filebase == Py_None)) {
14514  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14515  __PYX_ERR(1, 344, __pyx_L1_error)
14516  }
14517  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 344, __pyx_L1_error)
14518  __Pyx_GOTREF(__pyx_t_1);
14519  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 344, __pyx_L1_error)
14520  __pyx_v_failed = readTetgenElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14522 
14523  /* "cmeshTools.pyx":338
14524  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14525  *
14526  * cpdef void generateFromTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14527  * unicode filebase,
14528  * int base):
14529  */
14530 
14531  /* function exit code */
14532  goto __pyx_L0;
14533  __pyx_L1_error:;
14534  __Pyx_XDECREF(__pyx_t_1);
14535  __Pyx_WriteUnraisable("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14536  __pyx_L0:;
14537  __Pyx_RefNannyFinishContext();
14538 }
14539 
14540 /* Python wrapper */
14541 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14542 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14543  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14544  PyObject *__pyx_v_filebase = 0;
14545  int __pyx_v_base;
14546  PyObject *__pyx_r = 0;
14547  __Pyx_RefNannyDeclarations
14548  __Pyx_RefNannySetupContext("generateFromTetgenFiles (wrapper)", 0);
14549  {
14550  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14551  PyObject* values[3] = {0,0,0};
14552  if (unlikely(__pyx_kwds)) {
14553  Py_ssize_t kw_args;
14554  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14555  switch (pos_args) {
14556  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14557  CYTHON_FALLTHROUGH;
14558  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14559  CYTHON_FALLTHROUGH;
14560  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14561  CYTHON_FALLTHROUGH;
14562  case 0: break;
14563  default: goto __pyx_L5_argtuple_error;
14564  }
14565  kw_args = PyDict_Size(__pyx_kwds);
14566  switch (pos_args) {
14567  case 0:
14568  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14569  else goto __pyx_L5_argtuple_error;
14570  CYTHON_FALLTHROUGH;
14571  case 1:
14572  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14573  else {
14574  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, 1); __PYX_ERR(1, 338, __pyx_L3_error)
14575  }
14576  CYTHON_FALLTHROUGH;
14577  case 2:
14578  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14579  else {
14580  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, 2); __PYX_ERR(1, 338, __pyx_L3_error)
14581  }
14582  }
14583  if (unlikely(kw_args > 0)) {
14584  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTetgenFiles") < 0)) __PYX_ERR(1, 338, __pyx_L3_error)
14585  }
14586  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14587  goto __pyx_L5_argtuple_error;
14588  } else {
14589  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14590  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14591  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14592  }
14593  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14594  __pyx_v_filebase = ((PyObject*)values[1]);
14595  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 340, __pyx_L3_error)
14596  }
14597  goto __pyx_L4_argument_unpacking_done;
14598  __pyx_L5_argtuple_error:;
14599  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 338, __pyx_L3_error)
14600  __pyx_L3_error:;
14601  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14602  __Pyx_RefNannyFinishContext();
14603  return NULL;
14604  __pyx_L4_argument_unpacking_done:;
14605  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 338, __pyx_L1_error)
14606  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 339, __pyx_L1_error)
14607  __pyx_r = __pyx_pf_10cmeshTools_14generateFromTetgenFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14608 
14609  /* function exit code */
14610  goto __pyx_L0;
14611  __pyx_L1_error:;
14612  __pyx_r = NULL;
14613  __pyx_L0:;
14614  __Pyx_RefNannyFinishContext();
14615  return __pyx_r;
14616 }
14617 
14618 static PyObject *__pyx_pf_10cmeshTools_14generateFromTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14619  PyObject *__pyx_r = NULL;
14620  __Pyx_RefNannyDeclarations
14621  PyObject *__pyx_t_1 = NULL;
14622  __Pyx_RefNannySetupContext("generateFromTetgenFiles", 0);
14623  __Pyx_XDECREF(__pyx_r);
14624  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTetgenFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 338, __pyx_L1_error)
14625  __Pyx_GOTREF(__pyx_t_1);
14626  __pyx_r = __pyx_t_1;
14627  __pyx_t_1 = 0;
14628  goto __pyx_L0;
14629 
14630  /* function exit code */
14631  __pyx_L1_error:;
14632  __Pyx_XDECREF(__pyx_t_1);
14633  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14634  __pyx_r = NULL;
14635  __pyx_L0:;
14636  __Pyx_XGIVEREF(__pyx_r);
14637  __Pyx_RefNannyFinishContext();
14638  return __pyx_r;
14639 }
14640 
14641 /* "cmeshTools.pyx":346
14642  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14643  *
14644  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh, # <<<<<<<<<<<<<<
14645  * unicode filebase,
14646  * int base):
14647  */
14648 
14649 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14650 static void __pyx_f_10cmeshTools_generateFromTetgenFilesParallel(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14651  CYTHON_UNUSED int __pyx_v_failed;
14652  __Pyx_RefNannyDeclarations
14653  PyObject *__pyx_t_1 = NULL;
14654  char const *__pyx_t_2;
14655  char const *__pyx_t_3;
14656  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel", 0);
14657 
14658  /* "cmeshTools.pyx":350
14659  * int base):
14660  * cdef int failed
14661  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14662  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14663  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14664  */
14665  if (unlikely(__pyx_v_filebase == Py_None)) {
14666  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14667  __PYX_ERR(1, 350, __pyx_L1_error)
14668  }
14669  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 350, __pyx_L1_error)
14670  __Pyx_GOTREF(__pyx_t_1);
14671  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 350, __pyx_L1_error)
14672  __pyx_v_failed = readTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14674 
14675  /* "cmeshTools.pyx":351
14676  * cdef int failed
14677  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14678  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
14679  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14680  *
14681  */
14682  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
14683 
14684  /* "cmeshTools.pyx":352
14685  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14686  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14687  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14688  *
14689  * cpdef void writeTetgenFiles(CMesh cmesh,
14690  */
14691  if (unlikely(__pyx_v_filebase == Py_None)) {
14692  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14693  __PYX_ERR(1, 352, __pyx_L1_error)
14694  }
14695  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 352, __pyx_L1_error)
14696  __Pyx_GOTREF(__pyx_t_1);
14697  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 352, __pyx_L1_error)
14698  __pyx_v_failed = readTetgenElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14699  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14700 
14701  /* "cmeshTools.pyx":346
14702  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14703  *
14704  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh, # <<<<<<<<<<<<<<
14705  * unicode filebase,
14706  * int base):
14707  */
14708 
14709  /* function exit code */
14710  goto __pyx_L0;
14711  __pyx_L1_error:;
14712  __Pyx_XDECREF(__pyx_t_1);
14713  __Pyx_WriteUnraisable("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14714  __pyx_L0:;
14715  __Pyx_RefNannyFinishContext();
14716 }
14717 
14718 /* Python wrapper */
14719 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14720 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14721  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14722  PyObject *__pyx_v_filebase = 0;
14723  int __pyx_v_base;
14724  PyObject *__pyx_r = 0;
14725  __Pyx_RefNannyDeclarations
14726  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel (wrapper)", 0);
14727  {
14728  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14729  PyObject* values[3] = {0,0,0};
14730  if (unlikely(__pyx_kwds)) {
14731  Py_ssize_t kw_args;
14732  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14733  switch (pos_args) {
14734  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14735  CYTHON_FALLTHROUGH;
14736  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14737  CYTHON_FALLTHROUGH;
14738  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14739  CYTHON_FALLTHROUGH;
14740  case 0: break;
14741  default: goto __pyx_L5_argtuple_error;
14742  }
14743  kw_args = PyDict_Size(__pyx_kwds);
14744  switch (pos_args) {
14745  case 0:
14746  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14747  else goto __pyx_L5_argtuple_error;
14748  CYTHON_FALLTHROUGH;
14749  case 1:
14750  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14751  else {
14752  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, 1); __PYX_ERR(1, 346, __pyx_L3_error)
14753  }
14754  CYTHON_FALLTHROUGH;
14755  case 2:
14756  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14757  else {
14758  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, 2); __PYX_ERR(1, 346, __pyx_L3_error)
14759  }
14760  }
14761  if (unlikely(kw_args > 0)) {
14762  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTetgenFilesParallel") < 0)) __PYX_ERR(1, 346, __pyx_L3_error)
14763  }
14764  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14765  goto __pyx_L5_argtuple_error;
14766  } else {
14767  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14768  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14769  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14770  }
14771  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14772  __pyx_v_filebase = ((PyObject*)values[1]);
14773  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error)
14774  }
14775  goto __pyx_L4_argument_unpacking_done;
14776  __pyx_L5_argtuple_error:;
14777  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 346, __pyx_L3_error)
14778  __pyx_L3_error:;
14779  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename);
14780  __Pyx_RefNannyFinishContext();
14781  return NULL;
14782  __pyx_L4_argument_unpacking_done:;
14783  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 346, __pyx_L1_error)
14784  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 347, __pyx_L1_error)
14785  __pyx_r = __pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14786 
14787  /* function exit code */
14788  goto __pyx_L0;
14789  __pyx_L1_error:;
14790  __pyx_r = NULL;
14791  __pyx_L0:;
14792  __Pyx_RefNannyFinishContext();
14793  return __pyx_r;
14794 }
14795 
14796 static PyObject *__pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14797  PyObject *__pyx_r = NULL;
14798  __Pyx_RefNannyDeclarations
14799  PyObject *__pyx_t_1 = NULL;
14800  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel", 0);
14801  __Pyx_XDECREF(__pyx_r);
14802  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTetgenFilesParallel(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 346, __pyx_L1_error)
14803  __Pyx_GOTREF(__pyx_t_1);
14804  __pyx_r = __pyx_t_1;
14805  __pyx_t_1 = 0;
14806  goto __pyx_L0;
14807 
14808  /* function exit code */
14809  __pyx_L1_error:;
14810  __Pyx_XDECREF(__pyx_t_1);
14811  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename);
14812  __pyx_r = NULL;
14813  __pyx_L0:;
14814  __Pyx_XGIVEREF(__pyx_r);
14815  __Pyx_RefNannyFinishContext();
14816  return __pyx_r;
14817 }
14818 
14819 /* "cmeshTools.pyx":354
14820  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14821  *
14822  * cpdef void writeTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14823  * unicode filebase,
14824  * int base):
14825  */
14826 
14827 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14828 static void __pyx_f_10cmeshTools_writeTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14829  CYTHON_UNUSED int __pyx_v_failed;
14830  __Pyx_RefNannyDeclarations
14831  PyObject *__pyx_t_1 = NULL;
14832  char const *__pyx_t_2;
14833  __Pyx_RefNannySetupContext("writeTetgenFiles", 0);
14834 
14835  /* "cmeshTools.pyx":358
14836  * int base):
14837  * cdef int failed
14838  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14839  *
14840  * cpdef void write3dmFiles(CMesh cmesh,
14841  */
14842  if (unlikely(__pyx_v_filebase == Py_None)) {
14843  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14844  __PYX_ERR(1, 358, __pyx_L1_error)
14845  }
14846  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
14847  __Pyx_GOTREF(__pyx_t_1);
14848  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 358, __pyx_L1_error)
14849  __pyx_v_failed = writeTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14850  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14851 
14852  /* "cmeshTools.pyx":354
14853  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14854  *
14855  * cpdef void writeTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14856  * unicode filebase,
14857  * int base):
14858  */
14859 
14860  /* function exit code */
14861  goto __pyx_L0;
14862  __pyx_L1_error:;
14863  __Pyx_XDECREF(__pyx_t_1);
14864  __Pyx_WriteUnraisable("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14865  __pyx_L0:;
14866  __Pyx_RefNannyFinishContext();
14867 }
14868 
14869 /* Python wrapper */
14870 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14871 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14872  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14873  PyObject *__pyx_v_filebase = 0;
14874  int __pyx_v_base;
14875  PyObject *__pyx_r = 0;
14876  __Pyx_RefNannyDeclarations
14877  __Pyx_RefNannySetupContext("writeTetgenFiles (wrapper)", 0);
14878  {
14879  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14880  PyObject* values[3] = {0,0,0};
14881  if (unlikely(__pyx_kwds)) {
14882  Py_ssize_t kw_args;
14883  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14884  switch (pos_args) {
14885  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14886  CYTHON_FALLTHROUGH;
14887  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14888  CYTHON_FALLTHROUGH;
14889  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14890  CYTHON_FALLTHROUGH;
14891  case 0: break;
14892  default: goto __pyx_L5_argtuple_error;
14893  }
14894  kw_args = PyDict_Size(__pyx_kwds);
14895  switch (pos_args) {
14896  case 0:
14897  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14898  else goto __pyx_L5_argtuple_error;
14899  CYTHON_FALLTHROUGH;
14900  case 1:
14901  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14902  else {
14903  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, 1); __PYX_ERR(1, 354, __pyx_L3_error)
14904  }
14905  CYTHON_FALLTHROUGH;
14906  case 2:
14907  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14908  else {
14909  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, 2); __PYX_ERR(1, 354, __pyx_L3_error)
14910  }
14911  }
14912  if (unlikely(kw_args > 0)) {
14913  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeTetgenFiles") < 0)) __PYX_ERR(1, 354, __pyx_L3_error)
14914  }
14915  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14916  goto __pyx_L5_argtuple_error;
14917  } else {
14918  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14919  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14920  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14921  }
14922  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14923  __pyx_v_filebase = ((PyObject*)values[1]);
14924  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 356, __pyx_L3_error)
14925  }
14926  goto __pyx_L4_argument_unpacking_done;
14927  __pyx_L5_argtuple_error:;
14928  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 354, __pyx_L3_error)
14929  __pyx_L3_error:;
14930  __Pyx_AddTraceback("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14931  __Pyx_RefNannyFinishContext();
14932  return NULL;
14933  __pyx_L4_argument_unpacking_done:;
14934  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 354, __pyx_L1_error)
14935  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 355, __pyx_L1_error)
14936  __pyx_r = __pyx_pf_10cmeshTools_18writeTetgenFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14937 
14938  /* function exit code */
14939  goto __pyx_L0;
14940  __pyx_L1_error:;
14941  __pyx_r = NULL;
14942  __pyx_L0:;
14943  __Pyx_RefNannyFinishContext();
14944  return __pyx_r;
14945 }
14946 
14947 static PyObject *__pyx_pf_10cmeshTools_18writeTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14948  PyObject *__pyx_r = NULL;
14949  __Pyx_RefNannyDeclarations
14950  PyObject *__pyx_t_1 = NULL;
14951  __Pyx_RefNannySetupContext("writeTetgenFiles", 0);
14952  __Pyx_XDECREF(__pyx_r);
14953  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_writeTetgenFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 354, __pyx_L1_error)
14954  __Pyx_GOTREF(__pyx_t_1);
14955  __pyx_r = __pyx_t_1;
14956  __pyx_t_1 = 0;
14957  goto __pyx_L0;
14958 
14959  /* function exit code */
14960  __pyx_L1_error:;
14961  __Pyx_XDECREF(__pyx_t_1);
14962  __Pyx_AddTraceback("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14963  __pyx_r = NULL;
14964  __pyx_L0:;
14965  __Pyx_XGIVEREF(__pyx_r);
14966  __Pyx_RefNannyFinishContext();
14967  return __pyx_r;
14968 }
14969 
14970 /* "cmeshTools.pyx":360
14971  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14972  *
14973  * cpdef void write3dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14974  * unicode filebase,
14975  * int base):
14976  */
14977 
14978 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14979 static void __pyx_f_10cmeshTools_write3dmFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14980  CYTHON_UNUSED int __pyx_v_failed;
14981  __Pyx_RefNannyDeclarations
14982  PyObject *__pyx_t_1 = NULL;
14983  char const *__pyx_t_2;
14984  __Pyx_RefNannySetupContext("write3dmFiles", 0);
14985 
14986  /* "cmeshTools.pyx":364
14987  * int base):
14988  * cdef int failed
14989  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14990  *
14991  * cpdef void write2dmFiles(CMesh cmesh,
14992  */
14993  if (unlikely(__pyx_v_filebase == Py_None)) {
14994  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14995  __PYX_ERR(1, 364, __pyx_L1_error)
14996  }
14997  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 364, __pyx_L1_error)
14998  __Pyx_GOTREF(__pyx_t_1);
14999  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 364, __pyx_L1_error)
15000  __pyx_v_failed = write3dmMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15001  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15002 
15003  /* "cmeshTools.pyx":360
15004  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
15005  *
15006  * cpdef void write3dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15007  * unicode filebase,
15008  * int base):
15009  */
15010 
15011  /* function exit code */
15012  goto __pyx_L0;
15013  __pyx_L1_error:;
15014  __Pyx_XDECREF(__pyx_t_1);
15015  __Pyx_WriteUnraisable("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15016  __pyx_L0:;
15017  __Pyx_RefNannyFinishContext();
15018 }
15019 
15020 /* Python wrapper */
15021 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15022 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15023  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15024  PyObject *__pyx_v_filebase = 0;
15025  int __pyx_v_base;
15026  PyObject *__pyx_r = 0;
15027  __Pyx_RefNannyDeclarations
15028  __Pyx_RefNannySetupContext("write3dmFiles (wrapper)", 0);
15029  {
15030  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15031  PyObject* values[3] = {0,0,0};
15032  if (unlikely(__pyx_kwds)) {
15033  Py_ssize_t kw_args;
15034  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15035  switch (pos_args) {
15036  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15037  CYTHON_FALLTHROUGH;
15038  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15039  CYTHON_FALLTHROUGH;
15040  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15041  CYTHON_FALLTHROUGH;
15042  case 0: break;
15043  default: goto __pyx_L5_argtuple_error;
15044  }
15045  kw_args = PyDict_Size(__pyx_kwds);
15046  switch (pos_args) {
15047  case 0:
15048  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15049  else goto __pyx_L5_argtuple_error;
15050  CYTHON_FALLTHROUGH;
15051  case 1:
15052  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15053  else {
15054  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, 1); __PYX_ERR(1, 360, __pyx_L3_error)
15055  }
15056  CYTHON_FALLTHROUGH;
15057  case 2:
15058  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15059  else {
15060  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, 2); __PYX_ERR(1, 360, __pyx_L3_error)
15061  }
15062  }
15063  if (unlikely(kw_args > 0)) {
15064  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write3dmFiles") < 0)) __PYX_ERR(1, 360, __pyx_L3_error)
15065  }
15066  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15067  goto __pyx_L5_argtuple_error;
15068  } else {
15069  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15070  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15071  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15072  }
15073  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15074  __pyx_v_filebase = ((PyObject*)values[1]);
15075  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 362, __pyx_L3_error)
15076  }
15077  goto __pyx_L4_argument_unpacking_done;
15078  __pyx_L5_argtuple_error:;
15079  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 360, __pyx_L3_error)
15080  __pyx_L3_error:;
15081  __Pyx_AddTraceback("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15082  __Pyx_RefNannyFinishContext();
15083  return NULL;
15084  __pyx_L4_argument_unpacking_done:;
15085  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 360, __pyx_L1_error)
15086  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 361, __pyx_L1_error)
15087  __pyx_r = __pyx_pf_10cmeshTools_20write3dmFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15088 
15089  /* function exit code */
15090  goto __pyx_L0;
15091  __pyx_L1_error:;
15092  __pyx_r = NULL;
15093  __pyx_L0:;
15094  __Pyx_RefNannyFinishContext();
15095  return __pyx_r;
15096 }
15097 
15098 static PyObject *__pyx_pf_10cmeshTools_20write3dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15099  PyObject *__pyx_r = NULL;
15100  __Pyx_RefNannyDeclarations
15101  PyObject *__pyx_t_1 = NULL;
15102  __Pyx_RefNannySetupContext("write3dmFiles", 0);
15103  __Pyx_XDECREF(__pyx_r);
15104  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_write3dmFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
15105  __Pyx_GOTREF(__pyx_t_1);
15106  __pyx_r = __pyx_t_1;
15107  __pyx_t_1 = 0;
15108  goto __pyx_L0;
15109 
15110  /* function exit code */
15111  __pyx_L1_error:;
15112  __Pyx_XDECREF(__pyx_t_1);
15113  __Pyx_AddTraceback("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15114  __pyx_r = NULL;
15115  __pyx_L0:;
15116  __Pyx_XGIVEREF(__pyx_r);
15117  __Pyx_RefNannyFinishContext();
15118  return __pyx_r;
15119 }
15120 
15121 /* "cmeshTools.pyx":366
15122  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15123  *
15124  * cpdef void write2dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15125  * unicode filebase,
15126  * int base):
15127  */
15128 
15129 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15130 static void __pyx_f_10cmeshTools_write2dmFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15131  CYTHON_UNUSED int __pyx_v_failed;
15132  __Pyx_RefNannyDeclarations
15133  PyObject *__pyx_t_1 = NULL;
15134  char const *__pyx_t_2;
15135  __Pyx_RefNannySetupContext("write2dmFiles", 0);
15136 
15137  /* "cmeshTools.pyx":370
15138  * int base):
15139  * cdef int failed
15140  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15141  *
15142  * cpdef void generateFromHexFile(CMesh cmesh,
15143  */
15144  if (unlikely(__pyx_v_filebase == Py_None)) {
15145  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15146  __PYX_ERR(1, 370, __pyx_L1_error)
15147  }
15148  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L1_error)
15149  __Pyx_GOTREF(__pyx_t_1);
15150  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 370, __pyx_L1_error)
15151  __pyx_v_failed = write2dmMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15152  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15153 
15154  /* "cmeshTools.pyx":366
15155  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15156  *
15157  * cpdef void write2dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15158  * unicode filebase,
15159  * int base):
15160  */
15161 
15162  /* function exit code */
15163  goto __pyx_L0;
15164  __pyx_L1_error:;
15165  __Pyx_XDECREF(__pyx_t_1);
15166  __Pyx_WriteUnraisable("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15167  __pyx_L0:;
15168  __Pyx_RefNannyFinishContext();
15169 }
15170 
15171 /* Python wrapper */
15172 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15173 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15174  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15175  PyObject *__pyx_v_filebase = 0;
15176  int __pyx_v_base;
15177  PyObject *__pyx_r = 0;
15178  __Pyx_RefNannyDeclarations
15179  __Pyx_RefNannySetupContext("write2dmFiles (wrapper)", 0);
15180  {
15181  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15182  PyObject* values[3] = {0,0,0};
15183  if (unlikely(__pyx_kwds)) {
15184  Py_ssize_t kw_args;
15185  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15186  switch (pos_args) {
15187  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15188  CYTHON_FALLTHROUGH;
15189  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15190  CYTHON_FALLTHROUGH;
15191  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15192  CYTHON_FALLTHROUGH;
15193  case 0: break;
15194  default: goto __pyx_L5_argtuple_error;
15195  }
15196  kw_args = PyDict_Size(__pyx_kwds);
15197  switch (pos_args) {
15198  case 0:
15199  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15200  else goto __pyx_L5_argtuple_error;
15201  CYTHON_FALLTHROUGH;
15202  case 1:
15203  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15204  else {
15205  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, 1); __PYX_ERR(1, 366, __pyx_L3_error)
15206  }
15207  CYTHON_FALLTHROUGH;
15208  case 2:
15209  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15210  else {
15211  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, 2); __PYX_ERR(1, 366, __pyx_L3_error)
15212  }
15213  }
15214  if (unlikely(kw_args > 0)) {
15215  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write2dmFiles") < 0)) __PYX_ERR(1, 366, __pyx_L3_error)
15216  }
15217  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15218  goto __pyx_L5_argtuple_error;
15219  } else {
15220  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15221  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15222  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15223  }
15224  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15225  __pyx_v_filebase = ((PyObject*)values[1]);
15226  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 368, __pyx_L3_error)
15227  }
15228  goto __pyx_L4_argument_unpacking_done;
15229  __pyx_L5_argtuple_error:;
15230  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 366, __pyx_L3_error)
15231  __pyx_L3_error:;
15232  __Pyx_AddTraceback("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15233  __Pyx_RefNannyFinishContext();
15234  return NULL;
15235  __pyx_L4_argument_unpacking_done:;
15236  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 366, __pyx_L1_error)
15237  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 367, __pyx_L1_error)
15238  __pyx_r = __pyx_pf_10cmeshTools_22write2dmFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15239 
15240  /* function exit code */
15241  goto __pyx_L0;
15242  __pyx_L1_error:;
15243  __pyx_r = NULL;
15244  __pyx_L0:;
15245  __Pyx_RefNannyFinishContext();
15246  return __pyx_r;
15247 }
15248 
15249 static PyObject *__pyx_pf_10cmeshTools_22write2dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15250  PyObject *__pyx_r = NULL;
15251  __Pyx_RefNannyDeclarations
15252  PyObject *__pyx_t_1 = NULL;
15253  __Pyx_RefNannySetupContext("write2dmFiles", 0);
15254  __Pyx_XDECREF(__pyx_r);
15255  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_write2dmFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 366, __pyx_L1_error)
15256  __Pyx_GOTREF(__pyx_t_1);
15257  __pyx_r = __pyx_t_1;
15258  __pyx_t_1 = 0;
15259  goto __pyx_L0;
15260 
15261  /* function exit code */
15262  __pyx_L1_error:;
15263  __Pyx_XDECREF(__pyx_t_1);
15264  __Pyx_AddTraceback("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15265  __pyx_r = NULL;
15266  __pyx_L0:;
15267  __Pyx_XGIVEREF(__pyx_r);
15268  __Pyx_RefNannyFinishContext();
15269  return __pyx_r;
15270 }
15271 
15272 /* "cmeshTools.pyx":372
15273  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15274  *
15275  * cpdef void generateFromHexFile(CMesh cmesh, # <<<<<<<<<<<<<<
15276  * unicode filebase,
15277  * int base):
15278  */
15279 
15280 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15281 static void __pyx_f_10cmeshTools_generateFromHexFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15282  CYTHON_UNUSED int __pyx_v_failed;
15283  __Pyx_RefNannyDeclarations
15284  PyObject *__pyx_t_1 = NULL;
15285  char const *__pyx_t_2;
15286  __Pyx_RefNannySetupContext("generateFromHexFile", 0);
15287 
15288  /* "cmeshTools.pyx":376
15289  * int base):
15290  * cdef int failed
15291  * failed = cppm.readHex(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15292  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15293  *
15294  */
15295  if (unlikely(__pyx_v_filebase == Py_None)) {
15296  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15297  __PYX_ERR(1, 376, __pyx_L1_error)
15298  }
15299  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error)
15300  __Pyx_GOTREF(__pyx_t_1);
15301  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 376, __pyx_L1_error)
15302  __pyx_v_failed = readHex(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15303  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15304 
15305  /* "cmeshTools.pyx":377
15306  * cdef int failed
15307  * failed = cppm.readHex(cmesh.mesh,filebase.encode('utf8'),base);
15308  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15309  *
15310  * cpdef void generateFrom3DMFile(CMesh cmesh,
15311  */
15312  (void)(constructElementBoundaryElementsArray_hexahedron(__pyx_v_cmesh->mesh));
15313 
15314  /* "cmeshTools.pyx":372
15315  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15316  *
15317  * cpdef void generateFromHexFile(CMesh cmesh, # <<<<<<<<<<<<<<
15318  * unicode filebase,
15319  * int base):
15320  */
15321 
15322  /* function exit code */
15323  goto __pyx_L0;
15324  __pyx_L1_error:;
15325  __Pyx_XDECREF(__pyx_t_1);
15326  __Pyx_WriteUnraisable("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15327  __pyx_L0:;
15328  __Pyx_RefNannyFinishContext();
15329 }
15330 
15331 /* Python wrapper */
15332 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15333 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15334  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15335  PyObject *__pyx_v_filebase = 0;
15336  int __pyx_v_base;
15337  PyObject *__pyx_r = 0;
15338  __Pyx_RefNannyDeclarations
15339  __Pyx_RefNannySetupContext("generateFromHexFile (wrapper)", 0);
15340  {
15341  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15342  PyObject* values[3] = {0,0,0};
15343  if (unlikely(__pyx_kwds)) {
15344  Py_ssize_t kw_args;
15345  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15346  switch (pos_args) {
15347  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15348  CYTHON_FALLTHROUGH;
15349  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15350  CYTHON_FALLTHROUGH;
15351  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15352  CYTHON_FALLTHROUGH;
15353  case 0: break;
15354  default: goto __pyx_L5_argtuple_error;
15355  }
15356  kw_args = PyDict_Size(__pyx_kwds);
15357  switch (pos_args) {
15358  case 0:
15359  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15360  else goto __pyx_L5_argtuple_error;
15361  CYTHON_FALLTHROUGH;
15362  case 1:
15363  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15364  else {
15365  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, 1); __PYX_ERR(1, 372, __pyx_L3_error)
15366  }
15367  CYTHON_FALLTHROUGH;
15368  case 2:
15369  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15370  else {
15371  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, 2); __PYX_ERR(1, 372, __pyx_L3_error)
15372  }
15373  }
15374  if (unlikely(kw_args > 0)) {
15375  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromHexFile") < 0)) __PYX_ERR(1, 372, __pyx_L3_error)
15376  }
15377  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15378  goto __pyx_L5_argtuple_error;
15379  } else {
15380  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15381  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15382  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15383  }
15384  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15385  __pyx_v_filebase = ((PyObject*)values[1]);
15386  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 374, __pyx_L3_error)
15387  }
15388  goto __pyx_L4_argument_unpacking_done;
15389  __pyx_L5_argtuple_error:;
15390  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 372, __pyx_L3_error)
15391  __pyx_L3_error:;
15392  __Pyx_AddTraceback("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15393  __Pyx_RefNannyFinishContext();
15394  return NULL;
15395  __pyx_L4_argument_unpacking_done:;
15396  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 372, __pyx_L1_error)
15397  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 373, __pyx_L1_error)
15398  __pyx_r = __pyx_pf_10cmeshTools_24generateFromHexFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15399 
15400  /* function exit code */
15401  goto __pyx_L0;
15402  __pyx_L1_error:;
15403  __pyx_r = NULL;
15404  __pyx_L0:;
15405  __Pyx_RefNannyFinishContext();
15406  return __pyx_r;
15407 }
15408 
15409 static PyObject *__pyx_pf_10cmeshTools_24generateFromHexFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15410  PyObject *__pyx_r = NULL;
15411  __Pyx_RefNannyDeclarations
15412  PyObject *__pyx_t_1 = NULL;
15413  __Pyx_RefNannySetupContext("generateFromHexFile", 0);
15414  __Pyx_XDECREF(__pyx_r);
15415  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromHexFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __pyx_L1_error)
15416  __Pyx_GOTREF(__pyx_t_1);
15417  __pyx_r = __pyx_t_1;
15418  __pyx_t_1 = 0;
15419  goto __pyx_L0;
15420 
15421  /* function exit code */
15422  __pyx_L1_error:;
15423  __Pyx_XDECREF(__pyx_t_1);
15424  __Pyx_AddTraceback("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15425  __pyx_r = NULL;
15426  __pyx_L0:;
15427  __Pyx_XGIVEREF(__pyx_r);
15428  __Pyx_RefNannyFinishContext();
15429  return __pyx_r;
15430 }
15431 
15432 /* "cmeshTools.pyx":379
15433  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15434  *
15435  * cpdef void generateFrom3DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15436  * unicode filebase,
15437  * int base):
15438  */
15439 
15440 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15441 static void __pyx_f_10cmeshTools_generateFrom3DMFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15442  CYTHON_UNUSED int __pyx_v_failed;
15443  __Pyx_RefNannyDeclarations
15444  PyObject *__pyx_t_1 = NULL;
15445  char const *__pyx_t_2;
15446  char const *__pyx_t_3;
15447  __Pyx_RefNannySetupContext("generateFrom3DMFile", 0);
15448 
15449  /* "cmeshTools.pyx":383
15450  * int base):
15451  * cdef int failed
15452  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15453  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15454  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15455  */
15456  if (unlikely(__pyx_v_filebase == Py_None)) {
15457  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15458  __PYX_ERR(1, 383, __pyx_L1_error)
15459  }
15460  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error)
15461  __Pyx_GOTREF(__pyx_t_1);
15462  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 383, __pyx_L1_error)
15463  __pyx_v_failed = read3DM(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15464  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15465 
15466  /* "cmeshTools.pyx":384
15467  * cdef int failed
15468  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base);
15469  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15470  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15471  *
15472  */
15473  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
15474 
15475  /* "cmeshTools.pyx":385
15476  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base);
15477  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15478  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15479  *
15480  * cpdef void generateFrom2DMFile(CMesh cmesh,
15481  */
15482  if (unlikely(__pyx_v_filebase == Py_None)) {
15483  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15484  __PYX_ERR(1, 385, __pyx_L1_error)
15485  }
15486  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 385, __pyx_L1_error)
15487  __Pyx_GOTREF(__pyx_t_1);
15488  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 385, __pyx_L1_error)
15489  __pyx_v_failed = readBC(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
15490  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15491 
15492  /* "cmeshTools.pyx":379
15493  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15494  *
15495  * cpdef void generateFrom3DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15496  * unicode filebase,
15497  * int base):
15498  */
15499 
15500  /* function exit code */
15501  goto __pyx_L0;
15502  __pyx_L1_error:;
15503  __Pyx_XDECREF(__pyx_t_1);
15504  __Pyx_WriteUnraisable("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15505  __pyx_L0:;
15506  __Pyx_RefNannyFinishContext();
15507 }
15508 
15509 /* Python wrapper */
15510 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15511 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15512  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15513  PyObject *__pyx_v_filebase = 0;
15514  int __pyx_v_base;
15515  PyObject *__pyx_r = 0;
15516  __Pyx_RefNannyDeclarations
15517  __Pyx_RefNannySetupContext("generateFrom3DMFile (wrapper)", 0);
15518  {
15519  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15520  PyObject* values[3] = {0,0,0};
15521  if (unlikely(__pyx_kwds)) {
15522  Py_ssize_t kw_args;
15523  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15524  switch (pos_args) {
15525  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15526  CYTHON_FALLTHROUGH;
15527  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15528  CYTHON_FALLTHROUGH;
15529  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15530  CYTHON_FALLTHROUGH;
15531  case 0: break;
15532  default: goto __pyx_L5_argtuple_error;
15533  }
15534  kw_args = PyDict_Size(__pyx_kwds);
15535  switch (pos_args) {
15536  case 0:
15537  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15538  else goto __pyx_L5_argtuple_error;
15539  CYTHON_FALLTHROUGH;
15540  case 1:
15541  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15542  else {
15543  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, 1); __PYX_ERR(1, 379, __pyx_L3_error)
15544  }
15545  CYTHON_FALLTHROUGH;
15546  case 2:
15547  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15548  else {
15549  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, 2); __PYX_ERR(1, 379, __pyx_L3_error)
15550  }
15551  }
15552  if (unlikely(kw_args > 0)) {
15553  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFrom3DMFile") < 0)) __PYX_ERR(1, 379, __pyx_L3_error)
15554  }
15555  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15556  goto __pyx_L5_argtuple_error;
15557  } else {
15558  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15559  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15560  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15561  }
15562  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15563  __pyx_v_filebase = ((PyObject*)values[1]);
15564  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 381, __pyx_L3_error)
15565  }
15566  goto __pyx_L4_argument_unpacking_done;
15567  __pyx_L5_argtuple_error:;
15568  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 379, __pyx_L3_error)
15569  __pyx_L3_error:;
15570  __Pyx_AddTraceback("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15571  __Pyx_RefNannyFinishContext();
15572  return NULL;
15573  __pyx_L4_argument_unpacking_done:;
15574  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 379, __pyx_L1_error)
15575  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 380, __pyx_L1_error)
15576  __pyx_r = __pyx_pf_10cmeshTools_26generateFrom3DMFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15577 
15578  /* function exit code */
15579  goto __pyx_L0;
15580  __pyx_L1_error:;
15581  __pyx_r = NULL;
15582  __pyx_L0:;
15583  __Pyx_RefNannyFinishContext();
15584  return __pyx_r;
15585 }
15586 
15587 static PyObject *__pyx_pf_10cmeshTools_26generateFrom3DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15588  PyObject *__pyx_r = NULL;
15589  __Pyx_RefNannyDeclarations
15590  PyObject *__pyx_t_1 = NULL;
15591  __Pyx_RefNannySetupContext("generateFrom3DMFile", 0);
15592  __Pyx_XDECREF(__pyx_r);
15593  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFrom3DMFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 379, __pyx_L1_error)
15594  __Pyx_GOTREF(__pyx_t_1);
15595  __pyx_r = __pyx_t_1;
15596  __pyx_t_1 = 0;
15597  goto __pyx_L0;
15598 
15599  /* function exit code */
15600  __pyx_L1_error:;
15601  __Pyx_XDECREF(__pyx_t_1);
15602  __Pyx_AddTraceback("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15603  __pyx_r = NULL;
15604  __pyx_L0:;
15605  __Pyx_XGIVEREF(__pyx_r);
15606  __Pyx_RefNannyFinishContext();
15607  return __pyx_r;
15608 }
15609 
15610 /* "cmeshTools.pyx":387
15611  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15612  *
15613  * cpdef void generateFrom2DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15614  * unicode filebase,
15615  * int base):
15616  */
15617 
15618 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15619 static void __pyx_f_10cmeshTools_generateFrom2DMFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15620  CYTHON_UNUSED int __pyx_v_failed;
15621  __Pyx_RefNannyDeclarations
15622  PyObject *__pyx_t_1 = NULL;
15623  char const *__pyx_t_2;
15624  char const *__pyx_t_3;
15625  __Pyx_RefNannySetupContext("generateFrom2DMFile", 0);
15626 
15627  /* "cmeshTools.pyx":391
15628  * int base):
15629  * cdef int failed
15630  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15631  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
15632  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15633  */
15634  if (unlikely(__pyx_v_filebase == Py_None)) {
15635  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15636  __PYX_ERR(1, 391, __pyx_L1_error)
15637  }
15638  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 391, __pyx_L1_error)
15639  __Pyx_GOTREF(__pyx_t_1);
15640  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 391, __pyx_L1_error)
15641  __pyx_v_failed = read2DM(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15642  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15643 
15644  /* "cmeshTools.pyx":392
15645  * cdef int failed
15646  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base);
15647  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
15648  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15649  *
15650  */
15651  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
15652 
15653  /* "cmeshTools.pyx":393
15654  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base);
15655  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
15656  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15657  *
15658  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh):
15659  */
15660  if (unlikely(__pyx_v_filebase == Py_None)) {
15661  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15662  __PYX_ERR(1, 393, __pyx_L1_error)
15663  }
15664  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 393, __pyx_L1_error)
15665  __Pyx_GOTREF(__pyx_t_1);
15666  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 393, __pyx_L1_error)
15667  __pyx_v_failed = readBC(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
15668  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15669 
15670  /* "cmeshTools.pyx":387
15671  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15672  *
15673  * cpdef void generateFrom2DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15674  * unicode filebase,
15675  * int base):
15676  */
15677 
15678  /* function exit code */
15679  goto __pyx_L0;
15680  __pyx_L1_error:;
15681  __Pyx_XDECREF(__pyx_t_1);
15682  __Pyx_WriteUnraisable("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15683  __pyx_L0:;
15684  __Pyx_RefNannyFinishContext();
15685 }
15686 
15687 /* Python wrapper */
15688 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15689 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15690  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15691  PyObject *__pyx_v_filebase = 0;
15692  int __pyx_v_base;
15693  PyObject *__pyx_r = 0;
15694  __Pyx_RefNannyDeclarations
15695  __Pyx_RefNannySetupContext("generateFrom2DMFile (wrapper)", 0);
15696  {
15697  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15698  PyObject* values[3] = {0,0,0};
15699  if (unlikely(__pyx_kwds)) {
15700  Py_ssize_t kw_args;
15701  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15702  switch (pos_args) {
15703  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15704  CYTHON_FALLTHROUGH;
15705  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15706  CYTHON_FALLTHROUGH;
15707  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15708  CYTHON_FALLTHROUGH;
15709  case 0: break;
15710  default: goto __pyx_L5_argtuple_error;
15711  }
15712  kw_args = PyDict_Size(__pyx_kwds);
15713  switch (pos_args) {
15714  case 0:
15715  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15716  else goto __pyx_L5_argtuple_error;
15717  CYTHON_FALLTHROUGH;
15718  case 1:
15719  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15720  else {
15721  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, 1); __PYX_ERR(1, 387, __pyx_L3_error)
15722  }
15723  CYTHON_FALLTHROUGH;
15724  case 2:
15725  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15726  else {
15727  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, 2); __PYX_ERR(1, 387, __pyx_L3_error)
15728  }
15729  }
15730  if (unlikely(kw_args > 0)) {
15731  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFrom2DMFile") < 0)) __PYX_ERR(1, 387, __pyx_L3_error)
15732  }
15733  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15734  goto __pyx_L5_argtuple_error;
15735  } else {
15736  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15737  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15738  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15739  }
15740  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15741  __pyx_v_filebase = ((PyObject*)values[1]);
15742  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 389, __pyx_L3_error)
15743  }
15744  goto __pyx_L4_argument_unpacking_done;
15745  __pyx_L5_argtuple_error:;
15746  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 387, __pyx_L3_error)
15747  __pyx_L3_error:;
15748  __Pyx_AddTraceback("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15749  __Pyx_RefNannyFinishContext();
15750  return NULL;
15751  __pyx_L4_argument_unpacking_done:;
15752  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 387, __pyx_L1_error)
15753  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 388, __pyx_L1_error)
15754  __pyx_r = __pyx_pf_10cmeshTools_28generateFrom2DMFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15755 
15756  /* function exit code */
15757  goto __pyx_L0;
15758  __pyx_L1_error:;
15759  __pyx_r = NULL;
15760  __pyx_L0:;
15761  __Pyx_RefNannyFinishContext();
15762  return __pyx_r;
15763 }
15764 
15765 static PyObject *__pyx_pf_10cmeshTools_28generateFrom2DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15766  PyObject *__pyx_r = NULL;
15767  __Pyx_RefNannyDeclarations
15768  PyObject *__pyx_t_1 = NULL;
15769  __Pyx_RefNannySetupContext("generateFrom2DMFile", 0);
15770  __Pyx_XDECREF(__pyx_r);
15771  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFrom2DMFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 387, __pyx_L1_error)
15772  __Pyx_GOTREF(__pyx_t_1);
15773  __pyx_r = __pyx_t_1;
15774  __pyx_t_1 = 0;
15775  goto __pyx_L0;
15776 
15777  /* function exit code */
15778  __pyx_L1_error:;
15779  __Pyx_XDECREF(__pyx_t_1);
15780  __Pyx_AddTraceback("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15781  __pyx_r = NULL;
15782  __pyx_L0:;
15783  __Pyx_XGIVEREF(__pyx_r);
15784  __Pyx_RefNannyFinishContext();
15785  return __pyx_r;
15786 }
15787 
15788 /* "cmeshTools.pyx":395
15789  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15790  *
15791  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15792  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15793  *
15794  */
15795 
15796 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15797 static void __pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
15798  __Pyx_RefNannyDeclarations
15799  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron", 0);
15800 
15801  /* "cmeshTools.pyx":396
15802  *
15803  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh):
15804  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15805  *
15806  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh):
15807  */
15808  (void)(computeGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
15809 
15810  /* "cmeshTools.pyx":395
15811  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15812  *
15813  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15814  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15815  *
15816  */
15817 
15818  /* function exit code */
15819  __Pyx_RefNannyFinishContext();
15820 }
15821 
15822 /* Python wrapper */
15823 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15824 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
15825  PyObject *__pyx_r = 0;
15826  __Pyx_RefNannyDeclarations
15827  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron (wrapper)", 0);
15828  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 395, __pyx_L1_error)
15829  __pyx_r = __pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
15830 
15831  /* function exit code */
15832  goto __pyx_L0;
15833  __pyx_L1_error:;
15834  __pyx_r = NULL;
15835  __pyx_L0:;
15836  __Pyx_RefNannyFinishContext();
15837  return __pyx_r;
15838 }
15839 
15840 static PyObject *__pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
15841  PyObject *__pyx_r = NULL;
15842  __Pyx_RefNannyDeclarations
15843  PyObject *__pyx_t_1 = NULL;
15844  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron", 0);
15845  __Pyx_XDECREF(__pyx_r);
15846  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 395, __pyx_L1_error)
15847  __Pyx_GOTREF(__pyx_t_1);
15848  __pyx_r = __pyx_t_1;
15849  __pyx_t_1 = 0;
15850  goto __pyx_L0;
15851 
15852  /* function exit code */
15853  __pyx_L1_error:;
15854  __Pyx_XDECREF(__pyx_t_1);
15855  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
15856  __pyx_r = NULL;
15857  __pyx_L0:;
15858  __Pyx_XGIVEREF(__pyx_r);
15859  __Pyx_RefNannyFinishContext();
15860  return __pyx_r;
15861 }
15862 
15863 /* "cmeshTools.pyx":398
15864  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15865  *
15866  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15867  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15868  *
15869  */
15870 
15871 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15872 static void __pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
15873  __Pyx_RefNannyDeclarations
15874  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron", 0);
15875 
15876  /* "cmeshTools.pyx":399
15877  *
15878  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh):
15879  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15880  *
15881  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh,
15882  */
15883  (void)(allocateGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
15884 
15885  /* "cmeshTools.pyx":398
15886  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15887  *
15888  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15889  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15890  *
15891  */
15892 
15893  /* function exit code */
15894  __Pyx_RefNannyFinishContext();
15895 }
15896 
15897 /* Python wrapper */
15898 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15899 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
15900  PyObject *__pyx_r = 0;
15901  __Pyx_RefNannyDeclarations
15902  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron (wrapper)", 0);
15903  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 398, __pyx_L1_error)
15904  __pyx_r = __pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
15905 
15906  /* function exit code */
15907  goto __pyx_L0;
15908  __pyx_L1_error:;
15909  __pyx_r = NULL;
15910  __pyx_L0:;
15911  __Pyx_RefNannyFinishContext();
15912  return __pyx_r;
15913 }
15914 
15915 static PyObject *__pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
15916  PyObject *__pyx_r = NULL;
15917  __Pyx_RefNannyDeclarations
15918  PyObject *__pyx_t_1 = NULL;
15919  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron", 0);
15920  __Pyx_XDECREF(__pyx_r);
15921  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error)
15922  __Pyx_GOTREF(__pyx_t_1);
15923  __pyx_r = __pyx_t_1;
15924  __pyx_t_1 = 0;
15925  goto __pyx_L0;
15926 
15927  /* function exit code */
15928  __pyx_L1_error:;
15929  __Pyx_XDECREF(__pyx_t_1);
15930  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
15931  __pyx_r = NULL;
15932  __pyx_L0:;
15933  __Pyx_XGIVEREF(__pyx_r);
15934  __Pyx_RefNannyFinishContext();
15935  return __pyx_r;
15936 }
15937 
15938 /* "cmeshTools.pyx":401
15939  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15940  *
15941  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh, # <<<<<<<<<<<<<<
15942  * int nElements_global,
15943  * int nNodes_global,
15944  */
15945 
15946 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15947 static void __pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element, CYTHON_UNUSED int __pyx_skip_dispatch) {
15948  __Pyx_RefNannyDeclarations
15949  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures", 0);
15950 
15951  /* "cmeshTools.pyx":405
15952  * int nNodes_global,
15953  * int nNodes_element):
15954  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element); # <<<<<<<<<<<<<<
15955  *
15956  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
15957  */
15958  (void)(allocateNodeAndElementNodeDataStructures(__pyx_v_cmesh->mesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element));
15959 
15960  /* "cmeshTools.pyx":401
15961  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15962  *
15963  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh, # <<<<<<<<<<<<<<
15964  * int nElements_global,
15965  * int nNodes_global,
15966  */
15967 
15968  /* function exit code */
15969  __Pyx_RefNannyFinishContext();
15970 }
15971 
15972 /* Python wrapper */
15973 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15974 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15975  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15976  int __pyx_v_nElements_global;
15977  int __pyx_v_nNodes_global;
15978  int __pyx_v_nNodes_element;
15979  PyObject *__pyx_r = 0;
15980  __Pyx_RefNannyDeclarations
15981  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures (wrapper)", 0);
15982  {
15983  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_nElements_global,&__pyx_n_s_nNodes_global,&__pyx_n_s_nNodes_element,0};
15984  PyObject* values[4] = {0,0,0,0};
15985  if (unlikely(__pyx_kwds)) {
15986  Py_ssize_t kw_args;
15987  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15988  switch (pos_args) {
15989  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15990  CYTHON_FALLTHROUGH;
15991  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15992  CYTHON_FALLTHROUGH;
15993  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15994  CYTHON_FALLTHROUGH;
15995  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15996  CYTHON_FALLTHROUGH;
15997  case 0: break;
15998  default: goto __pyx_L5_argtuple_error;
15999  }
16000  kw_args = PyDict_Size(__pyx_kwds);
16001  switch (pos_args) {
16002  case 0:
16003  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16004  else goto __pyx_L5_argtuple_error;
16005  CYTHON_FALLTHROUGH;
16006  case 1:
16007  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
16008  else {
16009  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 1); __PYX_ERR(1, 401, __pyx_L3_error)
16010  }
16011  CYTHON_FALLTHROUGH;
16012  case 2:
16013  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_global)) != 0)) kw_args--;
16014  else {
16015  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 2); __PYX_ERR(1, 401, __pyx_L3_error)
16016  }
16017  CYTHON_FALLTHROUGH;
16018  case 3:
16019  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
16020  else {
16021  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 3); __PYX_ERR(1, 401, __pyx_L3_error)
16022  }
16023  }
16024  if (unlikely(kw_args > 0)) {
16025  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allocateNodeAndElementNodeDataStructures") < 0)) __PYX_ERR(1, 401, __pyx_L3_error)
16026  }
16027  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
16028  goto __pyx_L5_argtuple_error;
16029  } else {
16030  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16031  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16032  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16033  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16034  }
16035  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
16036  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L3_error)
16037  __pyx_v_nNodes_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nNodes_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 403, __pyx_L3_error)
16038  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 404, __pyx_L3_error)
16039  }
16040  goto __pyx_L4_argument_unpacking_done;
16041  __pyx_L5_argtuple_error:;
16042  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 401, __pyx_L3_error)
16043  __pyx_L3_error:;
16044  __Pyx_AddTraceback("cmeshTools.allocateNodeAndElementNodeDataStructures", __pyx_clineno, __pyx_lineno, __pyx_filename);
16045  __Pyx_RefNannyFinishContext();
16046  return NULL;
16047  __pyx_L4_argument_unpacking_done:;
16048  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 401, __pyx_L1_error)
16049  __pyx_r = __pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(__pyx_self, __pyx_v_cmesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element);
16050 
16051  /* function exit code */
16052  goto __pyx_L0;
16053  __pyx_L1_error:;
16054  __pyx_r = NULL;
16055  __pyx_L0:;
16056  __Pyx_RefNannyFinishContext();
16057  return __pyx_r;
16058 }
16059 
16060 static PyObject *__pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element) {
16061  PyObject *__pyx_r = NULL;
16062  __Pyx_RefNannyDeclarations
16063  PyObject *__pyx_t_1 = NULL;
16064  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures", 0);
16065  __Pyx_XDECREF(__pyx_r);
16066  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(__pyx_v_cmesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 401, __pyx_L1_error)
16067  __Pyx_GOTREF(__pyx_t_1);
16068  __pyx_r = __pyx_t_1;
16069  __pyx_t_1 = 0;
16070  goto __pyx_L0;
16071 
16072  /* function exit code */
16073  __pyx_L1_error:;
16074  __Pyx_XDECREF(__pyx_t_1);
16075  __Pyx_AddTraceback("cmeshTools.allocateNodeAndElementNodeDataStructures", __pyx_clineno, __pyx_lineno, __pyx_filename);
16076  __pyx_r = NULL;
16077  __pyx_L0:;
16078  __Pyx_XGIVEREF(__pyx_r);
16079  __Pyx_RefNannyFinishContext();
16080  return __pyx_r;
16081 }
16082 
16083 /* "cmeshTools.pyx":407
16084  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element);
16085  *
16086  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh): # <<<<<<<<<<<<<<
16087  * if cmesh.mesh.nNodes_element == 4:
16088  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16089  */
16090 
16091 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16092 static void __pyx_f_10cmeshTools_constructElementBoundaryElementsArray(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16093  __Pyx_RefNannyDeclarations
16094  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray", 0);
16095 
16096  /* "cmeshTools.pyx":408
16097  *
16098  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16099  * if cmesh.mesh.nNodes_element == 4: # <<<<<<<<<<<<<<
16100  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16101  * elif cmesh.mesh.nNodes_element == 3:
16102  */
16103  switch (__pyx_v_cmesh->mesh.nNodes_element) {
16104  case 4:
16105 
16106  /* "cmeshTools.pyx":409
16107  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16108  * if cmesh.mesh.nNodes_element == 4:
16109  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16110  * elif cmesh.mesh.nNodes_element == 3:
16111  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16112  */
16113  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
16114 
16115  /* "cmeshTools.pyx":408
16116  *
16117  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16118  * if cmesh.mesh.nNodes_element == 4: # <<<<<<<<<<<<<<
16119  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16120  * elif cmesh.mesh.nNodes_element == 3:
16121  */
16122  break;
16123  case 3:
16124 
16125  /* "cmeshTools.pyx":411
16126  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16127  * elif cmesh.mesh.nNodes_element == 3:
16128  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16129  * else:
16130  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16131  */
16132  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
16133 
16134  /* "cmeshTools.pyx":410
16135  * if cmesh.mesh.nNodes_element == 4:
16136  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16137  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
16138  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16139  * else:
16140  */
16141  break;
16142  default:
16143 
16144  /* "cmeshTools.pyx":413
16145  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16146  * else:
16147  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh); # <<<<<<<<<<<<<<
16148  *
16149  * cpdef void generateTriangularMeshFromRectangularGrid(int nx,
16150  */
16151  (void)(constructElementBoundaryElementsArray_edge(__pyx_v_cmesh->mesh));
16152  break;
16153  }
16154 
16155  /* "cmeshTools.pyx":407
16156  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element);
16157  *
16158  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh): # <<<<<<<<<<<<<<
16159  * if cmesh.mesh.nNodes_element == 4:
16160  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16161  */
16162 
16163  /* function exit code */
16164  __Pyx_RefNannyFinishContext();
16165 }
16166 
16167 /* Python wrapper */
16168 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16169 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16170  PyObject *__pyx_r = 0;
16171  __Pyx_RefNannyDeclarations
16172  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray (wrapper)", 0);
16173  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 407, __pyx_L1_error)
16174  __pyx_r = __pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16175 
16176  /* function exit code */
16177  goto __pyx_L0;
16178  __pyx_L1_error:;
16179  __pyx_r = NULL;
16180  __pyx_L0:;
16181  __Pyx_RefNannyFinishContext();
16182  return __pyx_r;
16183 }
16184 
16185 static PyObject *__pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16186  PyObject *__pyx_r = NULL;
16187  __Pyx_RefNannyDeclarations
16188  PyObject *__pyx_t_1 = NULL;
16189  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray", 0);
16190  __Pyx_XDECREF(__pyx_r);
16191  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_constructElementBoundaryElementsArray(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __pyx_L1_error)
16192  __Pyx_GOTREF(__pyx_t_1);
16193  __pyx_r = __pyx_t_1;
16194  __pyx_t_1 = 0;
16195  goto __pyx_L0;
16196 
16197  /* function exit code */
16198  __pyx_L1_error:;
16199  __Pyx_XDECREF(__pyx_t_1);
16200  __Pyx_AddTraceback("cmeshTools.constructElementBoundaryElementsArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
16201  __pyx_r = NULL;
16202  __pyx_L0:;
16203  __Pyx_XGIVEREF(__pyx_r);
16204  __Pyx_RefNannyFinishContext();
16205  return __pyx_r;
16206 }
16207 
16208 /* "cmeshTools.pyx":415
16209  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16210  *
16211  * cpdef void generateTriangularMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16212  * int ny,
16213  * double Lx,
16214  */
16215 
16216 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16217 static void __pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag, CYTHON_UNUSED int __pyx_skip_dispatch) {
16218  __Pyx_RefNannyDeclarations
16219  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid", 0);
16220 
16221  /* "cmeshTools.pyx":421
16222  * CMesh cmesh,
16223  * int triangleFlag):
16224  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag); # <<<<<<<<<<<<<<
16225  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16226  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16227  */
16228  (void)(regularRectangularToTriangularMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_cmesh->mesh, __pyx_v_triangleFlag));
16229 
16230  /* "cmeshTools.pyx":422
16231  * int triangleFlag):
16232  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag);
16233  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16234  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16235  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16236  */
16237  (void)(regularRectangularToTriangularMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16238 
16239  /* "cmeshTools.pyx":423
16240  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag);
16241  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16242  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16243  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16244  *
16245  */
16246  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
16247 
16248  /* "cmeshTools.pyx":424
16249  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16250  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16251  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16252  *
16253  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx,
16254  */
16255  (void)(regularRectangularToTriangularElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16256 
16257  /* "cmeshTools.pyx":415
16258  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16259  *
16260  * cpdef void generateTriangularMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16261  * int ny,
16262  * double Lx,
16263  */
16264 
16265  /* function exit code */
16266  __Pyx_RefNannyFinishContext();
16267 }
16268 
16269 /* Python wrapper */
16270 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16271 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16272  int __pyx_v_nx;
16273  int __pyx_v_ny;
16274  double __pyx_v_Lx;
16275  double __pyx_v_Ly;
16276  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16277  int __pyx_v_triangleFlag;
16278  PyObject *__pyx_r = 0;
16279  __Pyx_RefNannyDeclarations
16280  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid (wrapper)", 0);
16281  {
16282  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_cmesh,&__pyx_n_s_triangleFlag,0};
16283  PyObject* values[6] = {0,0,0,0,0,0};
16284  if (unlikely(__pyx_kwds)) {
16285  Py_ssize_t kw_args;
16286  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16287  switch (pos_args) {
16288  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16289  CYTHON_FALLTHROUGH;
16290  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16291  CYTHON_FALLTHROUGH;
16292  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16293  CYTHON_FALLTHROUGH;
16294  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16295  CYTHON_FALLTHROUGH;
16296  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16297  CYTHON_FALLTHROUGH;
16298  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16299  CYTHON_FALLTHROUGH;
16300  case 0: break;
16301  default: goto __pyx_L5_argtuple_error;
16302  }
16303  kw_args = PyDict_Size(__pyx_kwds);
16304  switch (pos_args) {
16305  case 0:
16306  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
16307  else goto __pyx_L5_argtuple_error;
16308  CYTHON_FALLTHROUGH;
16309  case 1:
16310  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
16311  else {
16312  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 1); __PYX_ERR(1, 415, __pyx_L3_error)
16313  }
16314  CYTHON_FALLTHROUGH;
16315  case 2:
16316  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
16317  else {
16318  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 2); __PYX_ERR(1, 415, __pyx_L3_error)
16319  }
16320  CYTHON_FALLTHROUGH;
16321  case 3:
16322  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
16323  else {
16324  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 3); __PYX_ERR(1, 415, __pyx_L3_error)
16325  }
16326  CYTHON_FALLTHROUGH;
16327  case 4:
16328  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16329  else {
16330  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 4); __PYX_ERR(1, 415, __pyx_L3_error)
16331  }
16332  CYTHON_FALLTHROUGH;
16333  case 5:
16334  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_triangleFlag)) != 0)) kw_args--;
16335  else {
16336  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 5); __PYX_ERR(1, 415, __pyx_L3_error)
16337  }
16338  }
16339  if (unlikely(kw_args > 0)) {
16340  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateTriangularMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 415, __pyx_L3_error)
16341  }
16342  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
16343  goto __pyx_L5_argtuple_error;
16344  } else {
16345  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16346  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16347  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16348  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16349  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16350  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16351  }
16352  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 415, __pyx_L3_error)
16353  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 416, __pyx_L3_error)
16354  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 417, __pyx_L3_error)
16355  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 418, __pyx_L3_error)
16356  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[4]);
16357  __pyx_v_triangleFlag = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_triangleFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 420, __pyx_L3_error)
16358  }
16359  goto __pyx_L4_argument_unpacking_done;
16360  __pyx_L5_argtuple_error:;
16361  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 415, __pyx_L3_error)
16362  __pyx_L3_error:;
16363  __Pyx_AddTraceback("cmeshTools.generateTriangularMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16364  __Pyx_RefNannyFinishContext();
16365  return NULL;
16366  __pyx_L4_argument_unpacking_done:;
16367  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 419, __pyx_L1_error)
16368  __pyx_r = __pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, __pyx_v_triangleFlag);
16369 
16370  /* function exit code */
16371  goto __pyx_L0;
16372  __pyx_L1_error:;
16373  __pyx_r = NULL;
16374  __pyx_L0:;
16375  __Pyx_RefNannyFinishContext();
16376  return __pyx_r;
16377 }
16378 
16379 static PyObject *__pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag) {
16380  PyObject *__pyx_r = NULL;
16381  __Pyx_RefNannyDeclarations
16382  PyObject *__pyx_t_1 = NULL;
16383  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid", 0);
16384  __Pyx_XDECREF(__pyx_r);
16385  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, __pyx_v_triangleFlag, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error)
16386  __Pyx_GOTREF(__pyx_t_1);
16387  __pyx_r = __pyx_t_1;
16388  __pyx_t_1 = 0;
16389  goto __pyx_L0;
16390 
16391  /* function exit code */
16392  __pyx_L1_error:;
16393  __Pyx_XDECREF(__pyx_t_1);
16394  __Pyx_AddTraceback("cmeshTools.generateTriangularMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16395  __pyx_r = NULL;
16396  __pyx_L0:;
16397  __Pyx_XGIVEREF(__pyx_r);
16398  __Pyx_RefNannyFinishContext();
16399  return __pyx_r;
16400 }
16401 
16402 /* "cmeshTools.pyx":426
16403  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16404  *
16405  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16406  * int ny,
16407  * int nz,
16408  */
16409 
16410 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16411 static void __pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16412  __Pyx_RefNannyDeclarations
16413  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid", 0);
16414 
16415  /* "cmeshTools.pyx":436
16416  * double Lz,
16417  * CMesh cmesh):
16418  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh); # <<<<<<<<<<<<<<
16419  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16420  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16421  */
16422  (void)(regularHexahedralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_cmesh->mesh));
16423 
16424  /* "cmeshTools.pyx":437
16425  * CMesh cmesh):
16426  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh);
16427  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
16428  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16429  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16430  */
16431  (void)(regularMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
16432 
16433  /* "cmeshTools.pyx":438
16434  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh);
16435  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16436  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16437  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16438  *
16439  */
16440  (void)(constructElementBoundaryElementsArray_hexahedron(__pyx_v_cmesh->mesh));
16441 
16442  /* "cmeshTools.pyx":439
16443  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16444  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16445  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
16446  *
16447  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx,
16448  */
16449  (void)(regularHexahedralMeshElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
16450 
16451  /* "cmeshTools.pyx":426
16452  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16453  *
16454  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16455  * int ny,
16456  * int nz,
16457  */
16458 
16459  /* function exit code */
16460  __Pyx_RefNannyFinishContext();
16461 }
16462 
16463 /* Python wrapper */
16464 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16465 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16466  int __pyx_v_nx;
16467  int __pyx_v_ny;
16468  int __pyx_v_nz;
16469  int __pyx_v_px;
16470  int __pyx_v_py;
16471  int __pyx_v_pz;
16472  double __pyx_v_Lx;
16473  double __pyx_v_Ly;
16474  double __pyx_v_Lz;
16475  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16476  PyObject *__pyx_r = 0;
16477  __Pyx_RefNannyDeclarations
16478  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid (wrapper)", 0);
16479  {
16480  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_Lz,&__pyx_n_s_cmesh,0};
16481  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
16482  if (unlikely(__pyx_kwds)) {
16483  Py_ssize_t kw_args;
16484  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16485  switch (pos_args) {
16486  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
16487  CYTHON_FALLTHROUGH;
16488  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
16489  CYTHON_FALLTHROUGH;
16490  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
16491  CYTHON_FALLTHROUGH;
16492  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16493  CYTHON_FALLTHROUGH;
16494  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16495  CYTHON_FALLTHROUGH;
16496  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16497  CYTHON_FALLTHROUGH;
16498  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16499  CYTHON_FALLTHROUGH;
16500  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16501  CYTHON_FALLTHROUGH;
16502  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16503  CYTHON_FALLTHROUGH;
16504  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16505  CYTHON_FALLTHROUGH;
16506  case 0: break;
16507  default: goto __pyx_L5_argtuple_error;
16508  }
16509  kw_args = PyDict_Size(__pyx_kwds);
16510  switch (pos_args) {
16511  case 0:
16512  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
16513  else goto __pyx_L5_argtuple_error;
16514  CYTHON_FALLTHROUGH;
16515  case 1:
16516  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
16517  else {
16518  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 1); __PYX_ERR(1, 426, __pyx_L3_error)
16519  }
16520  CYTHON_FALLTHROUGH;
16521  case 2:
16522  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--;
16523  else {
16524  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 2); __PYX_ERR(1, 426, __pyx_L3_error)
16525  }
16526  CYTHON_FALLTHROUGH;
16527  case 3:
16528  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--;
16529  else {
16530  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 3); __PYX_ERR(1, 426, __pyx_L3_error)
16531  }
16532  CYTHON_FALLTHROUGH;
16533  case 4:
16534  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--;
16535  else {
16536  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 4); __PYX_ERR(1, 426, __pyx_L3_error)
16537  }
16538  CYTHON_FALLTHROUGH;
16539  case 5:
16540  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--;
16541  else {
16542  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 5); __PYX_ERR(1, 426, __pyx_L3_error)
16543  }
16544  CYTHON_FALLTHROUGH;
16545  case 6:
16546  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
16547  else {
16548  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 6); __PYX_ERR(1, 426, __pyx_L3_error)
16549  }
16550  CYTHON_FALLTHROUGH;
16551  case 7:
16552  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
16553  else {
16554  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 7); __PYX_ERR(1, 426, __pyx_L3_error)
16555  }
16556  CYTHON_FALLTHROUGH;
16557  case 8:
16558  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lz)) != 0)) kw_args--;
16559  else {
16560  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 8); __PYX_ERR(1, 426, __pyx_L3_error)
16561  }
16562  CYTHON_FALLTHROUGH;
16563  case 9:
16564  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16565  else {
16566  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 9); __PYX_ERR(1, 426, __pyx_L3_error)
16567  }
16568  }
16569  if (unlikely(kw_args > 0)) {
16570  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateHexahedralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 426, __pyx_L3_error)
16571  }
16572  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
16573  goto __pyx_L5_argtuple_error;
16574  } else {
16575  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16576  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16577  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16578  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16579  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16580  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16581  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16582  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
16583  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
16584  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
16585  }
16586  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 426, __pyx_L3_error)
16587  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 427, __pyx_L3_error)
16588  __pyx_v_nz = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 428, __pyx_L3_error)
16589  __pyx_v_px = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_px == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 429, __pyx_L3_error)
16590  __pyx_v_py = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_py == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L3_error)
16591  __pyx_v_pz = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_pz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 431, __pyx_L3_error)
16592  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 432, __pyx_L3_error)
16593  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 433, __pyx_L3_error)
16594  __pyx_v_Lz = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_Lz == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 434, __pyx_L3_error)
16595  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[9]);
16596  }
16597  goto __pyx_L4_argument_unpacking_done;
16598  __pyx_L5_argtuple_error:;
16599  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 426, __pyx_L3_error)
16600  __pyx_L3_error:;
16601  __Pyx_AddTraceback("cmeshTools.generateHexahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16602  __Pyx_RefNannyFinishContext();
16603  return NULL;
16604  __pyx_L4_argument_unpacking_done:;
16605  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 435, __pyx_L1_error)
16606  __pyx_r = __pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh);
16607 
16608  /* function exit code */
16609  goto __pyx_L0;
16610  __pyx_L1_error:;
16611  __pyx_r = NULL;
16612  __pyx_L0:;
16613  __Pyx_RefNannyFinishContext();
16614  return __pyx_r;
16615 }
16616 
16617 static PyObject *__pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16618  PyObject *__pyx_r = NULL;
16619  __Pyx_RefNannyDeclarations
16620  PyObject *__pyx_t_1 = NULL;
16621  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid", 0);
16622  __Pyx_XDECREF(__pyx_r);
16623  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 426, __pyx_L1_error)
16624  __Pyx_GOTREF(__pyx_t_1);
16625  __pyx_r = __pyx_t_1;
16626  __pyx_t_1 = 0;
16627  goto __pyx_L0;
16628 
16629  /* function exit code */
16630  __pyx_L1_error:;
16631  __Pyx_XDECREF(__pyx_t_1);
16632  __Pyx_AddTraceback("cmeshTools.generateHexahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16633  __pyx_r = NULL;
16634  __pyx_L0:;
16635  __Pyx_XGIVEREF(__pyx_r);
16636  __Pyx_RefNannyFinishContext();
16637  return __pyx_r;
16638 }
16639 
16640 /* "cmeshTools.pyx":441
16641  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16642  *
16643  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16644  * int ny,
16645  * int px,
16646  */
16647 
16648 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16649 static void __pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, CYTHON_UNUSED int __pyx_v_px, CYTHON_UNUSED int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16650  __Pyx_RefNannyDeclarations
16651  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid", 0);
16652 
16653  /* "cmeshTools.pyx":448
16654  * double Ly,
16655  * CMesh cmesh):
16656  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh); # <<<<<<<<<<<<<<
16657  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
16658  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
16659  */
16660  (void)(regularQuadrilateralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_cmesh->mesh));
16661 
16662  /* "cmeshTools.pyx":449
16663  * CMesh cmesh):
16664  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh);
16665  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16666  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
16667  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16668  */
16669  (void)(regularMeshNodes2D(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16670 
16671  /* "cmeshTools.pyx":450
16672  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh);
16673  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
16674  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
16675  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16676  *
16677  */
16678  (void)(constructElementBoundaryElementsArray_quadrilateral(__pyx_v_cmesh->mesh));
16679 
16680  /* "cmeshTools.pyx":451
16681  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
16682  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
16683  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16684  *
16685  * cpdef void computeGeometricInfo_triangle(CMesh cmesh):
16686  */
16687  (void)(regularQuadrilateralMeshElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16688 
16689  /* "cmeshTools.pyx":441
16690  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16691  *
16692  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16693  * int ny,
16694  * int px,
16695  */
16696 
16697  /* function exit code */
16698  __Pyx_RefNannyFinishContext();
16699 }
16700 
16701 /* Python wrapper */
16702 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16703 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16704  int __pyx_v_nx;
16705  int __pyx_v_ny;
16706  int __pyx_v_px;
16707  int __pyx_v_py;
16708  double __pyx_v_Lx;
16709  double __pyx_v_Ly;
16710  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16711  PyObject *__pyx_r = 0;
16712  __Pyx_RefNannyDeclarations
16713  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid (wrapper)", 0);
16714  {
16715  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_cmesh,0};
16716  PyObject* values[7] = {0,0,0,0,0,0,0};
16717  if (unlikely(__pyx_kwds)) {
16718  Py_ssize_t kw_args;
16719  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16720  switch (pos_args) {
16721  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16722  CYTHON_FALLTHROUGH;
16723  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16724  CYTHON_FALLTHROUGH;
16725  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16726  CYTHON_FALLTHROUGH;
16727  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16728  CYTHON_FALLTHROUGH;
16729  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16730  CYTHON_FALLTHROUGH;
16731  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16732  CYTHON_FALLTHROUGH;
16733  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16734  CYTHON_FALLTHROUGH;
16735  case 0: break;
16736  default: goto __pyx_L5_argtuple_error;
16737  }
16738  kw_args = PyDict_Size(__pyx_kwds);
16739  switch (pos_args) {
16740  case 0:
16741  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
16742  else goto __pyx_L5_argtuple_error;
16743  CYTHON_FALLTHROUGH;
16744  case 1:
16745  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
16746  else {
16747  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 1); __PYX_ERR(1, 441, __pyx_L3_error)
16748  }
16749  CYTHON_FALLTHROUGH;
16750  case 2:
16751  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--;
16752  else {
16753  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 2); __PYX_ERR(1, 441, __pyx_L3_error)
16754  }
16755  CYTHON_FALLTHROUGH;
16756  case 3:
16757  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--;
16758  else {
16759  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 3); __PYX_ERR(1, 441, __pyx_L3_error)
16760  }
16761  CYTHON_FALLTHROUGH;
16762  case 4:
16763  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
16764  else {
16765  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 4); __PYX_ERR(1, 441, __pyx_L3_error)
16766  }
16767  CYTHON_FALLTHROUGH;
16768  case 5:
16769  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
16770  else {
16771  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 5); __PYX_ERR(1, 441, __pyx_L3_error)
16772  }
16773  CYTHON_FALLTHROUGH;
16774  case 6:
16775  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16776  else {
16777  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 6); __PYX_ERR(1, 441, __pyx_L3_error)
16778  }
16779  }
16780  if (unlikely(kw_args > 0)) {
16781  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateQuadrilateralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 441, __pyx_L3_error)
16782  }
16783  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
16784  goto __pyx_L5_argtuple_error;
16785  } else {
16786  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16787  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16788  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16789  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16790  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16791  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16792  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16793  }
16794  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 441, __pyx_L3_error)
16795  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 442, __pyx_L3_error)
16796  __pyx_v_px = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_px == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L3_error)
16797  __pyx_v_py = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_py == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 444, __pyx_L3_error)
16798  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 445, __pyx_L3_error)
16799  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 446, __pyx_L3_error)
16800  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[6]);
16801  }
16802  goto __pyx_L4_argument_unpacking_done;
16803  __pyx_L5_argtuple_error:;
16804  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 441, __pyx_L3_error)
16805  __pyx_L3_error:;
16806  __Pyx_AddTraceback("cmeshTools.generateQuadrilateralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16807  __Pyx_RefNannyFinishContext();
16808  return NULL;
16809  __pyx_L4_argument_unpacking_done:;
16810  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 447, __pyx_L1_error)
16811  __pyx_r = __pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_px, __pyx_v_py, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh);
16812 
16813  /* function exit code */
16814  goto __pyx_L0;
16815  __pyx_L1_error:;
16816  __pyx_r = NULL;
16817  __pyx_L0:;
16818  __Pyx_RefNannyFinishContext();
16819  return __pyx_r;
16820 }
16821 
16822 static PyObject *__pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_px, int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16823  PyObject *__pyx_r = NULL;
16824  __Pyx_RefNannyDeclarations
16825  PyObject *__pyx_t_1 = NULL;
16826  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid", 0);
16827  __Pyx_XDECREF(__pyx_r);
16828  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_px, __pyx_v_py, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 441, __pyx_L1_error)
16829  __Pyx_GOTREF(__pyx_t_1);
16830  __pyx_r = __pyx_t_1;
16831  __pyx_t_1 = 0;
16832  goto __pyx_L0;
16833 
16834  /* function exit code */
16835  __pyx_L1_error:;
16836  __Pyx_XDECREF(__pyx_t_1);
16837  __Pyx_AddTraceback("cmeshTools.generateQuadrilateralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16838  __pyx_r = NULL;
16839  __pyx_L0:;
16840  __Pyx_XGIVEREF(__pyx_r);
16841  __Pyx_RefNannyFinishContext();
16842  return __pyx_r;
16843 }
16844 
16845 /* "cmeshTools.pyx":453
16846  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16847  *
16848  * cpdef void computeGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16849  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16850  *
16851  */
16852 
16853 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16854 static void __pyx_f_10cmeshTools_computeGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16855  __Pyx_RefNannyDeclarations
16856  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle", 0);
16857 
16858  /* "cmeshTools.pyx":454
16859  *
16860  * cpdef void computeGeometricInfo_triangle(CMesh cmesh):
16861  * cppm.computeGeometricInfo_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16862  *
16863  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh):
16864  */
16865  (void)(computeGeometricInfo_triangle(__pyx_v_cmesh->mesh));
16866 
16867  /* "cmeshTools.pyx":453
16868  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16869  *
16870  * cpdef void computeGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16871  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16872  *
16873  */
16874 
16875  /* function exit code */
16876  __Pyx_RefNannyFinishContext();
16877 }
16878 
16879 /* Python wrapper */
16880 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16881 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16882  PyObject *__pyx_r = 0;
16883  __Pyx_RefNannyDeclarations
16884  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle (wrapper)", 0);
16885  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 453, __pyx_L1_error)
16886  __pyx_r = __pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16887 
16888  /* function exit code */
16889  goto __pyx_L0;
16890  __pyx_L1_error:;
16891  __pyx_r = NULL;
16892  __pyx_L0:;
16893  __Pyx_RefNannyFinishContext();
16894  return __pyx_r;
16895 }
16896 
16897 static PyObject *__pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16898  PyObject *__pyx_r = NULL;
16899  __Pyx_RefNannyDeclarations
16900  PyObject *__pyx_t_1 = NULL;
16901  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle", 0);
16902  __Pyx_XDECREF(__pyx_r);
16903  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_triangle(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error)
16904  __Pyx_GOTREF(__pyx_t_1);
16905  __pyx_r = __pyx_t_1;
16906  __pyx_t_1 = 0;
16907  goto __pyx_L0;
16908 
16909  /* function exit code */
16910  __pyx_L1_error:;
16911  __Pyx_XDECREF(__pyx_t_1);
16912  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
16913  __pyx_r = NULL;
16914  __pyx_L0:;
16915  __Pyx_XGIVEREF(__pyx_r);
16916  __Pyx_RefNannyFinishContext();
16917  return __pyx_r;
16918 }
16919 
16920 /* "cmeshTools.pyx":456
16921  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16922  *
16923  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16924  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
16925  *
16926  */
16927 
16928 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16929 static void __pyx_f_10cmeshTools_allocateGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16930  __Pyx_RefNannyDeclarations
16931  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle", 0);
16932 
16933  /* "cmeshTools.pyx":457
16934  *
16935  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh):
16936  * cppm.allocateGeometricInfo_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16937  *
16938  * cpdef void generateEdgeMeshFromRectangularGrid(int nx,
16939  */
16940  (void)(allocateGeometricInfo_triangle(__pyx_v_cmesh->mesh));
16941 
16942  /* "cmeshTools.pyx":456
16943  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16944  *
16945  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16946  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
16947  *
16948  */
16949 
16950  /* function exit code */
16951  __Pyx_RefNannyFinishContext();
16952 }
16953 
16954 /* Python wrapper */
16955 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16956 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16957  PyObject *__pyx_r = 0;
16958  __Pyx_RefNannyDeclarations
16959  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle (wrapper)", 0);
16960  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 456, __pyx_L1_error)
16961  __pyx_r = __pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16962 
16963  /* function exit code */
16964  goto __pyx_L0;
16965  __pyx_L1_error:;
16966  __pyx_r = NULL;
16967  __pyx_L0:;
16968  __Pyx_RefNannyFinishContext();
16969  return __pyx_r;
16970 }
16971 
16972 static PyObject *__pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16973  PyObject *__pyx_r = NULL;
16974  __Pyx_RefNannyDeclarations
16975  PyObject *__pyx_t_1 = NULL;
16976  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle", 0);
16977  __Pyx_XDECREF(__pyx_r);
16978  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_triangle(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 456, __pyx_L1_error)
16979  __Pyx_GOTREF(__pyx_t_1);
16980  __pyx_r = __pyx_t_1;
16981  __pyx_t_1 = 0;
16982  goto __pyx_L0;
16983 
16984  /* function exit code */
16985  __pyx_L1_error:;
16986  __Pyx_XDECREF(__pyx_t_1);
16987  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
16988  __pyx_r = NULL;
16989  __pyx_L0:;
16990  __Pyx_XGIVEREF(__pyx_r);
16991  __Pyx_RefNannyFinishContext();
16992  return __pyx_r;
16993 }
16994 
16995 /* "cmeshTools.pyx":459
16996  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
16997  *
16998  * cpdef void generateEdgeMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16999  * double Lx,
17000  * CMesh cmesh):
17001  */
17002 
17003 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17004 static void __pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17005  __Pyx_RefNannyDeclarations
17006  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid", 0);
17007 
17008  /* "cmeshTools.pyx":462
17009  * double Lx,
17010  * CMesh cmesh):
17011  * cppm.edgeMeshElements(nx,cmesh.mesh); # <<<<<<<<<<<<<<
17012  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh);
17013  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17014  */
17015  (void)(edgeMeshElements(__pyx_v_nx, __pyx_v_cmesh->mesh));
17016 
17017  /* "cmeshTools.pyx":463
17018  * CMesh cmesh):
17019  * cppm.edgeMeshElements(nx,cmesh.mesh);
17020  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh); # <<<<<<<<<<<<<<
17021  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17022  *
17023  */
17024  (void)(regularEdgeMeshNodes(__pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh->mesh));
17025 
17026  /* "cmeshTools.pyx":464
17027  * cppm.edgeMeshElements(nx,cmesh.mesh);
17028  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh);
17029  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17030  *
17031  * cpdef void computeGeometricInfo_edge(CMesh cmesh):
17032  */
17033  (void)(constructElementBoundaryElementsArray_edge(__pyx_v_cmesh->mesh));
17034 
17035  /* "cmeshTools.pyx":459
17036  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
17037  *
17038  * cpdef void generateEdgeMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
17039  * double Lx,
17040  * CMesh cmesh):
17041  */
17042 
17043  /* function exit code */
17044  __Pyx_RefNannyFinishContext();
17045 }
17046 
17047 /* Python wrapper */
17048 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17049 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17050  int __pyx_v_nx;
17051  double __pyx_v_Lx;
17052  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
17053  PyObject *__pyx_r = 0;
17054  __Pyx_RefNannyDeclarations
17055  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid (wrapper)", 0);
17056  {
17057  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_Lx,&__pyx_n_s_cmesh,0};
17058  PyObject* values[3] = {0,0,0};
17059  if (unlikely(__pyx_kwds)) {
17060  Py_ssize_t kw_args;
17061  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17062  switch (pos_args) {
17063  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17064  CYTHON_FALLTHROUGH;
17065  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17066  CYTHON_FALLTHROUGH;
17067  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17068  CYTHON_FALLTHROUGH;
17069  case 0: break;
17070  default: goto __pyx_L5_argtuple_error;
17071  }
17072  kw_args = PyDict_Size(__pyx_kwds);
17073  switch (pos_args) {
17074  case 0:
17075  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
17076  else goto __pyx_L5_argtuple_error;
17077  CYTHON_FALLTHROUGH;
17078  case 1:
17079  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
17080  else {
17081  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, 1); __PYX_ERR(1, 459, __pyx_L3_error)
17082  }
17083  CYTHON_FALLTHROUGH;
17084  case 2:
17085  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
17086  else {
17087  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, 2); __PYX_ERR(1, 459, __pyx_L3_error)
17088  }
17089  }
17090  if (unlikely(kw_args > 0)) {
17091  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateEdgeMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 459, __pyx_L3_error)
17092  }
17093  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
17094  goto __pyx_L5_argtuple_error;
17095  } else {
17096  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17097  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17098  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17099  }
17100  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 459, __pyx_L3_error)
17101  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 460, __pyx_L3_error)
17102  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[2]);
17103  }
17104  goto __pyx_L4_argument_unpacking_done;
17105  __pyx_L5_argtuple_error:;
17106  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 459, __pyx_L3_error)
17107  __pyx_L3_error:;
17108  __Pyx_AddTraceback("cmeshTools.generateEdgeMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17109  __Pyx_RefNannyFinishContext();
17110  return NULL;
17111  __pyx_L4_argument_unpacking_done:;
17112  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 461, __pyx_L1_error)
17113  __pyx_r = __pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh);
17114 
17115  /* function exit code */
17116  goto __pyx_L0;
17117  __pyx_L1_error:;
17118  __pyx_r = NULL;
17119  __pyx_L0:;
17120  __Pyx_RefNannyFinishContext();
17121  return __pyx_r;
17122 }
17123 
17124 static PyObject *__pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17125  PyObject *__pyx_r = NULL;
17126  __Pyx_RefNannyDeclarations
17127  PyObject *__pyx_t_1 = NULL;
17128  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid", 0);
17129  __Pyx_XDECREF(__pyx_r);
17130  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 459, __pyx_L1_error)
17131  __Pyx_GOTREF(__pyx_t_1);
17132  __pyx_r = __pyx_t_1;
17133  __pyx_t_1 = 0;
17134  goto __pyx_L0;
17135 
17136  /* function exit code */
17137  __pyx_L1_error:;
17138  __Pyx_XDECREF(__pyx_t_1);
17139  __Pyx_AddTraceback("cmeshTools.generateEdgeMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17140  __pyx_r = NULL;
17141  __pyx_L0:;
17142  __Pyx_XGIVEREF(__pyx_r);
17143  __Pyx_RefNannyFinishContext();
17144  return __pyx_r;
17145 }
17146 
17147 /* "cmeshTools.pyx":466
17148  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17149  *
17150  * cpdef void computeGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17151  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17152  *
17153  */
17154 
17155 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17156 static void __pyx_f_10cmeshTools_computeGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17157  __Pyx_RefNannyDeclarations
17158  __Pyx_RefNannySetupContext("computeGeometricInfo_edge", 0);
17159 
17160  /* "cmeshTools.pyx":467
17161  *
17162  * cpdef void computeGeometricInfo_edge(CMesh cmesh):
17163  * cppm.computeGeometricInfo_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17164  *
17165  * cpdef void allocateGeometricInfo_edge(CMesh cmesh):
17166  */
17167  (void)(computeGeometricInfo_edge(__pyx_v_cmesh->mesh));
17168 
17169  /* "cmeshTools.pyx":466
17170  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17171  *
17172  * cpdef void computeGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17173  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17174  *
17175  */
17176 
17177  /* function exit code */
17178  __Pyx_RefNannyFinishContext();
17179 }
17180 
17181 /* Python wrapper */
17182 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17183 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17184  PyObject *__pyx_r = 0;
17185  __Pyx_RefNannyDeclarations
17186  __Pyx_RefNannySetupContext("computeGeometricInfo_edge (wrapper)", 0);
17187  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 466, __pyx_L1_error)
17188  __pyx_r = __pyx_pf_10cmeshTools_50computeGeometricInfo_edge(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17189 
17190  /* function exit code */
17191  goto __pyx_L0;
17192  __pyx_L1_error:;
17193  __pyx_r = NULL;
17194  __pyx_L0:;
17195  __Pyx_RefNannyFinishContext();
17196  return __pyx_r;
17197 }
17198 
17199 static PyObject *__pyx_pf_10cmeshTools_50computeGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17200  PyObject *__pyx_r = NULL;
17201  __Pyx_RefNannyDeclarations
17202  PyObject *__pyx_t_1 = NULL;
17203  __Pyx_RefNannySetupContext("computeGeometricInfo_edge", 0);
17204  __Pyx_XDECREF(__pyx_r);
17205  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_edge(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 466, __pyx_L1_error)
17206  __Pyx_GOTREF(__pyx_t_1);
17207  __pyx_r = __pyx_t_1;
17208  __pyx_t_1 = 0;
17209  goto __pyx_L0;
17210 
17211  /* function exit code */
17212  __pyx_L1_error:;
17213  __Pyx_XDECREF(__pyx_t_1);
17214  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
17215  __pyx_r = NULL;
17216  __pyx_L0:;
17217  __Pyx_XGIVEREF(__pyx_r);
17218  __Pyx_RefNannyFinishContext();
17219  return __pyx_r;
17220 }
17221 
17222 /* "cmeshTools.pyx":469
17223  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17224  *
17225  * cpdef void allocateGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17226  * cppm.allocateGeometricInfo_edge(cmesh.mesh);
17227  *
17228  */
17229 
17230 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17231 static void __pyx_f_10cmeshTools_allocateGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17232  __Pyx_RefNannyDeclarations
17233  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge", 0);
17234 
17235  /* "cmeshTools.pyx":470
17236  *
17237  * cpdef void allocateGeometricInfo_edge(CMesh cmesh):
17238  * cppm.allocateGeometricInfo_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17239  *
17240  *
17241  */
17242  (void)(allocateGeometricInfo_edge(__pyx_v_cmesh->mesh));
17243 
17244  /* "cmeshTools.pyx":469
17245  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17246  *
17247  * cpdef void allocateGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17248  * cppm.allocateGeometricInfo_edge(cmesh.mesh);
17249  *
17250  */
17251 
17252  /* function exit code */
17253  __Pyx_RefNannyFinishContext();
17254 }
17255 
17256 /* Python wrapper */
17257 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17258 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17259  PyObject *__pyx_r = 0;
17260  __Pyx_RefNannyDeclarations
17261  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge (wrapper)", 0);
17262  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 469, __pyx_L1_error)
17263  __pyx_r = __pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17264 
17265  /* function exit code */
17266  goto __pyx_L0;
17267  __pyx_L1_error:;
17268  __pyx_r = NULL;
17269  __pyx_L0:;
17270  __Pyx_RefNannyFinishContext();
17271  return __pyx_r;
17272 }
17273 
17274 static PyObject *__pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17275  PyObject *__pyx_r = NULL;
17276  __Pyx_RefNannyDeclarations
17277  PyObject *__pyx_t_1 = NULL;
17278  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge", 0);
17279  __Pyx_XDECREF(__pyx_r);
17280  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_edge(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 469, __pyx_L1_error)
17281  __Pyx_GOTREF(__pyx_t_1);
17282  __pyx_r = __pyx_t_1;
17283  __pyx_t_1 = 0;
17284  goto __pyx_L0;
17285 
17286  /* function exit code */
17287  __pyx_L1_error:;
17288  __Pyx_XDECREF(__pyx_t_1);
17289  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
17290  __pyx_r = NULL;
17291  __pyx_L0:;
17292  __Pyx_XGIVEREF(__pyx_r);
17293  __Pyx_RefNannyFinishContext();
17294  return __pyx_r;
17295 }
17296 
17297 /* "cmeshTools.pyx":473
17298  *
17299  *
17300  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17301  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17302  *
17303  */
17304 
17305 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17306 static void __pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17307  __Pyx_RefNannyDeclarations
17308  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron", 0);
17309 
17310  /* "cmeshTools.pyx":474
17311  *
17312  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh):
17313  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
17314  *
17315  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh):
17316  */
17317  (void)(computeGeometricInfo_hexahedron(__pyx_v_cmesh->mesh));
17318 
17319  /* "cmeshTools.pyx":473
17320  *
17321  *
17322  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17323  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17324  *
17325  */
17326 
17327  /* function exit code */
17328  __Pyx_RefNannyFinishContext();
17329 }
17330 
17331 /* Python wrapper */
17332 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17333 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17334  PyObject *__pyx_r = 0;
17335  __Pyx_RefNannyDeclarations
17336  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron (wrapper)", 0);
17337  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 473, __pyx_L1_error)
17338  __pyx_r = __pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17339 
17340  /* function exit code */
17341  goto __pyx_L0;
17342  __pyx_L1_error:;
17343  __pyx_r = NULL;
17344  __pyx_L0:;
17345  __Pyx_RefNannyFinishContext();
17346  return __pyx_r;
17347 }
17348 
17349 static PyObject *__pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17350  PyObject *__pyx_r = NULL;
17351  __Pyx_RefNannyDeclarations
17352  PyObject *__pyx_t_1 = NULL;
17353  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron", 0);
17354  __Pyx_XDECREF(__pyx_r);
17355  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error)
17356  __Pyx_GOTREF(__pyx_t_1);
17357  __pyx_r = __pyx_t_1;
17358  __pyx_t_1 = 0;
17359  goto __pyx_L0;
17360 
17361  /* function exit code */
17362  __pyx_L1_error:;
17363  __Pyx_XDECREF(__pyx_t_1);
17364  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_hexahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
17365  __pyx_r = NULL;
17366  __pyx_L0:;
17367  __Pyx_XGIVEREF(__pyx_r);
17368  __Pyx_RefNannyFinishContext();
17369  return __pyx_r;
17370 }
17371 
17372 /* "cmeshTools.pyx":476
17373  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17374  *
17375  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17376  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17377  *
17378  */
17379 
17380 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17381 static void __pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17382  __Pyx_RefNannyDeclarations
17383  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral", 0);
17384 
17385  /* "cmeshTools.pyx":477
17386  *
17387  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh):
17388  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
17389  *
17390  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh):
17391  */
17392  (void)(computeGeometricInfo_quadrilateral(__pyx_v_cmesh->mesh));
17393 
17394  /* "cmeshTools.pyx":476
17395  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17396  *
17397  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17398  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17399  *
17400  */
17401 
17402  /* function exit code */
17403  __Pyx_RefNannyFinishContext();
17404 }
17405 
17406 /* Python wrapper */
17407 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17408 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17409  PyObject *__pyx_r = 0;
17410  __Pyx_RefNannyDeclarations
17411  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral (wrapper)", 0);
17412  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 476, __pyx_L1_error)
17413  __pyx_r = __pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17414 
17415  /* function exit code */
17416  goto __pyx_L0;
17417  __pyx_L1_error:;
17418  __pyx_r = NULL;
17419  __pyx_L0:;
17420  __Pyx_RefNannyFinishContext();
17421  return __pyx_r;
17422 }
17423 
17424 static PyObject *__pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17425  PyObject *__pyx_r = NULL;
17426  __Pyx_RefNannyDeclarations
17427  PyObject *__pyx_t_1 = NULL;
17428  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral", 0);
17429  __Pyx_XDECREF(__pyx_r);
17430  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 476, __pyx_L1_error)
17431  __Pyx_GOTREF(__pyx_t_1);
17432  __pyx_r = __pyx_t_1;
17433  __pyx_t_1 = 0;
17434  goto __pyx_L0;
17435 
17436  /* function exit code */
17437  __pyx_L1_error:;
17438  __Pyx_XDECREF(__pyx_t_1);
17439  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_quadrilateral", __pyx_clineno, __pyx_lineno, __pyx_filename);
17440  __pyx_r = NULL;
17441  __pyx_L0:;
17442  __Pyx_XGIVEREF(__pyx_r);
17443  __Pyx_RefNannyFinishContext();
17444  return __pyx_r;
17445 }
17446 
17447 /* "cmeshTools.pyx":479
17448  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17449  *
17450  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17451  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17452  *
17453  */
17454 
17455 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17456 static void __pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17457  __Pyx_RefNannyDeclarations
17458  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron", 0);
17459 
17460  /* "cmeshTools.pyx":480
17461  *
17462  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh):
17463  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
17464  *
17465  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh):
17466  */
17467  (void)(allocateGeometricInfo_hexahedron(__pyx_v_cmesh->mesh));
17468 
17469  /* "cmeshTools.pyx":479
17470  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17471  *
17472  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17473  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17474  *
17475  */
17476 
17477  /* function exit code */
17478  __Pyx_RefNannyFinishContext();
17479 }
17480 
17481 /* Python wrapper */
17482 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17483 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17484  PyObject *__pyx_r = 0;
17485  __Pyx_RefNannyDeclarations
17486  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron (wrapper)", 0);
17487  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 479, __pyx_L1_error)
17488  __pyx_r = __pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17489 
17490  /* function exit code */
17491  goto __pyx_L0;
17492  __pyx_L1_error:;
17493  __pyx_r = NULL;
17494  __pyx_L0:;
17495  __Pyx_RefNannyFinishContext();
17496  return __pyx_r;
17497 }
17498 
17499 static PyObject *__pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17500  PyObject *__pyx_r = NULL;
17501  __Pyx_RefNannyDeclarations
17502  PyObject *__pyx_t_1 = NULL;
17503  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron", 0);
17504  __Pyx_XDECREF(__pyx_r);
17505  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 479, __pyx_L1_error)
17506  __Pyx_GOTREF(__pyx_t_1);
17507  __pyx_r = __pyx_t_1;
17508  __pyx_t_1 = 0;
17509  goto __pyx_L0;
17510 
17511  /* function exit code */
17512  __pyx_L1_error:;
17513  __Pyx_XDECREF(__pyx_t_1);
17514  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_hexahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
17515  __pyx_r = NULL;
17516  __pyx_L0:;
17517  __Pyx_XGIVEREF(__pyx_r);
17518  __Pyx_RefNannyFinishContext();
17519  return __pyx_r;
17520 }
17521 
17522 /* "cmeshTools.pyx":482
17523  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17524  *
17525  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17526  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17527  *
17528  */
17529 
17530 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17531 static void __pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17532  __Pyx_RefNannyDeclarations
17533  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral", 0);
17534 
17535  /* "cmeshTools.pyx":483
17536  *
17537  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh):
17538  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
17539  *
17540  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh):
17541  */
17542  (void)(allocateGeometricInfo_quadrilateral(__pyx_v_cmesh->mesh));
17543 
17544  /* "cmeshTools.pyx":482
17545  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17546  *
17547  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17548  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17549  *
17550  */
17551 
17552  /* function exit code */
17553  __Pyx_RefNannyFinishContext();
17554 }
17555 
17556 /* Python wrapper */
17557 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17558 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17559  PyObject *__pyx_r = 0;
17560  __Pyx_RefNannyDeclarations
17561  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral (wrapper)", 0);
17562  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 482, __pyx_L1_error)
17563  __pyx_r = __pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17564 
17565  /* function exit code */
17566  goto __pyx_L0;
17567  __pyx_L1_error:;
17568  __pyx_r = NULL;
17569  __pyx_L0:;
17570  __Pyx_RefNannyFinishContext();
17571  return __pyx_r;
17572 }
17573 
17574 static PyObject *__pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17575  PyObject *__pyx_r = NULL;
17576  __Pyx_RefNannyDeclarations
17577  PyObject *__pyx_t_1 = NULL;
17578  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral", 0);
17579  __Pyx_XDECREF(__pyx_r);
17580  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error)
17581  __Pyx_GOTREF(__pyx_t_1);
17582  __pyx_r = __pyx_t_1;
17583  __pyx_t_1 = 0;
17584  goto __pyx_L0;
17585 
17586  /* function exit code */
17587  __pyx_L1_error:;
17588  __Pyx_XDECREF(__pyx_t_1);
17589  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_quadrilateral", __pyx_clineno, __pyx_lineno, __pyx_filename);
17590  __pyx_r = NULL;
17591  __pyx_L0:;
17592  __Pyx_XGIVEREF(__pyx_r);
17593  __Pyx_RefNannyFinishContext();
17594  return __pyx_r;
17595 }
17596 
17597 /* "cmeshTools.pyx":485
17598  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17599  *
17600  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17601  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17602  *
17603  */
17604 
17605 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17606 static void __pyx_f_10cmeshTools_computeGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17607  __Pyx_RefNannyDeclarations
17608  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS", 0);
17609 
17610  /* "cmeshTools.pyx":486
17611  *
17612  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh):
17613  * cppm.computeGeometricInfo_NURBS(cmesh.mesh); # <<<<<<<<<<<<<<
17614  *
17615  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh):
17616  */
17617  (void)(computeGeometricInfo_NURBS(__pyx_v_cmesh->mesh));
17618 
17619  /* "cmeshTools.pyx":485
17620  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17621  *
17622  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17623  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17624  *
17625  */
17626 
17627  /* function exit code */
17628  __Pyx_RefNannyFinishContext();
17629 }
17630 
17631 /* Python wrapper */
17632 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17633 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17634  PyObject *__pyx_r = 0;
17635  __Pyx_RefNannyDeclarations
17636  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS (wrapper)", 0);
17637  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 485, __pyx_L1_error)
17638  __pyx_r = __pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17639 
17640  /* function exit code */
17641  goto __pyx_L0;
17642  __pyx_L1_error:;
17643  __pyx_r = NULL;
17644  __pyx_L0:;
17645  __Pyx_RefNannyFinishContext();
17646  return __pyx_r;
17647 }
17648 
17649 static PyObject *__pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17650  PyObject *__pyx_r = NULL;
17651  __Pyx_RefNannyDeclarations
17652  PyObject *__pyx_t_1 = NULL;
17653  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS", 0);
17654  __Pyx_XDECREF(__pyx_r);
17655  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_NURBS(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error)
17656  __Pyx_GOTREF(__pyx_t_1);
17657  __pyx_r = __pyx_t_1;
17658  __pyx_t_1 = 0;
17659  goto __pyx_L0;
17660 
17661  /* function exit code */
17662  __pyx_L1_error:;
17663  __Pyx_XDECREF(__pyx_t_1);
17664  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_NURBS", __pyx_clineno, __pyx_lineno, __pyx_filename);
17665  __pyx_r = NULL;
17666  __pyx_L0:;
17667  __Pyx_XGIVEREF(__pyx_r);
17668  __Pyx_RefNannyFinishContext();
17669  return __pyx_r;
17670 }
17671 
17672 /* "cmeshTools.pyx":488
17673  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17674  *
17675  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17676  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
17677  *
17678  */
17679 
17680 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17681 static void __pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17682  __Pyx_RefNannyDeclarations
17683  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS", 0);
17684 
17685  /* "cmeshTools.pyx":489
17686  *
17687  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh):
17688  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh); # <<<<<<<<<<<<<<
17689  *
17690  * def locallyRefineMultilevelMesh(int nSpace,
17691  */
17692  (void)(allocateGeometricInfo_NURBS(__pyx_v_cmesh->mesh));
17693 
17694  /* "cmeshTools.pyx":488
17695  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17696  *
17697  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17698  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
17699  *
17700  */
17701 
17702  /* function exit code */
17703  __Pyx_RefNannyFinishContext();
17704 }
17705 
17706 /* Python wrapper */
17707 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17708 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17709  PyObject *__pyx_r = 0;
17710  __Pyx_RefNannyDeclarations
17711  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS (wrapper)", 0);
17712  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 488, __pyx_L1_error)
17713  __pyx_r = __pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17714 
17715  /* function exit code */
17716  goto __pyx_L0;
17717  __pyx_L1_error:;
17718  __pyx_r = NULL;
17719  __pyx_L0:;
17720  __Pyx_RefNannyFinishContext();
17721  return __pyx_r;
17722 }
17723 
17724 static PyObject *__pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17725  PyObject *__pyx_r = NULL;
17726  __Pyx_RefNannyDeclarations
17727  PyObject *__pyx_t_1 = NULL;
17728  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS", 0);
17729  __Pyx_XDECREF(__pyx_r);
17730  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error)
17731  __Pyx_GOTREF(__pyx_t_1);
17732  __pyx_r = __pyx_t_1;
17733  __pyx_t_1 = 0;
17734  goto __pyx_L0;
17735 
17736  /* function exit code */
17737  __pyx_L1_error:;
17738  __Pyx_XDECREF(__pyx_t_1);
17739  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_NURBS", __pyx_clineno, __pyx_lineno, __pyx_filename);
17740  __pyx_r = NULL;
17741  __pyx_L0:;
17742  __Pyx_XGIVEREF(__pyx_r);
17743  __Pyx_RefNannyFinishContext();
17744  return __pyx_r;
17745 }
17746 
17747 /* "cmeshTools.pyx":491
17748  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
17749  *
17750  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
17751  * CMultilevelMesh cmultilevelMesh,
17752  * np.ndarray elementTagArray,
17753  */
17754 
17755 /* Python wrapper */
17756 static PyObject *__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17757 static PyMethodDef __pyx_mdef_10cmeshTools_67locallyRefineMultilevelMesh = {"locallyRefineMultilevelMesh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh, METH_VARARGS|METH_KEYWORDS, 0};
17758 static PyObject *__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17759  int __pyx_v_nSpace;
17760  struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh = 0;
17761  PyArrayObject *__pyx_v_elementTagArray = 0;
17762  int __pyx_v_refineTypeFlag;
17763  PyObject *__pyx_r = 0;
17764  __Pyx_RefNannyDeclarations
17765  __Pyx_RefNannySetupContext("locallyRefineMultilevelMesh (wrapper)", 0);
17766  {
17767  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_cmultilevelMesh,&__pyx_n_s_elementTagArray,&__pyx_n_s_refineTypeFlag,0};
17768  PyObject* values[4] = {0,0,0,0};
17769  if (unlikely(__pyx_kwds)) {
17770  Py_ssize_t kw_args;
17771  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17772  switch (pos_args) {
17773  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17774  CYTHON_FALLTHROUGH;
17775  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17776  CYTHON_FALLTHROUGH;
17777  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17778  CYTHON_FALLTHROUGH;
17779  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17780  CYTHON_FALLTHROUGH;
17781  case 0: break;
17782  default: goto __pyx_L5_argtuple_error;
17783  }
17784  kw_args = PyDict_Size(__pyx_kwds);
17785  switch (pos_args) {
17786  case 0:
17787  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
17788  else goto __pyx_L5_argtuple_error;
17789  CYTHON_FALLTHROUGH;
17790  case 1:
17791  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmultilevelMesh)) != 0)) kw_args--;
17792  else {
17793  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, 1); __PYX_ERR(1, 491, __pyx_L3_error)
17794  }
17795  CYTHON_FALLTHROUGH;
17796  case 2:
17797  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementTagArray)) != 0)) kw_args--;
17798  else {
17799  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, 2); __PYX_ERR(1, 491, __pyx_L3_error)
17800  }
17801  CYTHON_FALLTHROUGH;
17802  case 3:
17803  if (kw_args > 0) {
17804  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_refineTypeFlag);
17805  if (value) { values[3] = value; kw_args--; }
17806  }
17807  }
17808  if (unlikely(kw_args > 0)) {
17809  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "locallyRefineMultilevelMesh") < 0)) __PYX_ERR(1, 491, __pyx_L3_error)
17810  }
17811  } else {
17812  switch (PyTuple_GET_SIZE(__pyx_args)) {
17813  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17814  CYTHON_FALLTHROUGH;
17815  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17816  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17817  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17818  break;
17819  default: goto __pyx_L5_argtuple_error;
17820  }
17821  }
17822  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 491, __pyx_L3_error)
17823  __pyx_v_cmultilevelMesh = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)values[1]);
17824  __pyx_v_elementTagArray = ((PyArrayObject *)values[2]);
17825  if (values[3]) {
17826  __pyx_v_refineTypeFlag = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_refineTypeFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 494, __pyx_L3_error)
17827  } else {
17828  __pyx_v_refineTypeFlag = ((int)0);
17829  }
17830  }
17831  goto __pyx_L4_argument_unpacking_done;
17832  __pyx_L5_argtuple_error:;
17833  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 491, __pyx_L3_error)
17834  __pyx_L3_error:;
17835  __Pyx_AddTraceback("cmeshTools.locallyRefineMultilevelMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17836  __Pyx_RefNannyFinishContext();
17837  return NULL;
17838  __pyx_L4_argument_unpacking_done:;
17839  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmultilevelMesh), __pyx_ptype_10cmeshTools_CMultilevelMesh, 1, "cmultilevelMesh", 0))) __PYX_ERR(1, 492, __pyx_L1_error)
17840  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementTagArray), __pyx_ptype_5numpy_ndarray, 1, "elementTagArray", 0))) __PYX_ERR(1, 493, __pyx_L1_error)
17841  __pyx_r = __pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(__pyx_self, __pyx_v_nSpace, __pyx_v_cmultilevelMesh, __pyx_v_elementTagArray, __pyx_v_refineTypeFlag);
17842 
17843  /* function exit code */
17844  goto __pyx_L0;
17845  __pyx_L1_error:;
17846  __pyx_r = NULL;
17847  __pyx_L0:;
17848  __Pyx_RefNannyFinishContext();
17849  return __pyx_r;
17850 }
17851 
17852 static PyObject *__pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh, PyArrayObject *__pyx_v_elementTagArray, int __pyx_v_refineTypeFlag) {
17853  CYTHON_UNUSED int __pyx_v_failed;
17854  int __pyx_v_finestLevel;
17855  PyObject *__pyx_r = NULL;
17856  __Pyx_RefNannyDeclarations
17857  int __pyx_t_1;
17858  int __pyx_t_2;
17859  PyObject *__pyx_t_3 = NULL;
17860  PyObject *__pyx_t_4 = NULL;
17861  PyObject *__pyx_t_5 = NULL;
17862  PyObject *__pyx_t_6 = NULL;
17863  __Pyx_RefNannySetupContext("locallyRefineMultilevelMesh", 0);
17864 
17865  /* "cmeshTools.pyx":496
17866  * int refineTypeFlag=0):
17867  * cdef int failed,finestLevel
17868  * if nSpace == 1: # <<<<<<<<<<<<<<
17869  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
17870  * <int*>(elementTagArray.data))
17871  */
17872  switch (__pyx_v_nSpace) {
17873  case 1:
17874 
17875  /* "cmeshTools.pyx":497
17876  * cdef int failed,finestLevel
17877  * if nSpace == 1:
17878  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
17879  * <int*>(elementTagArray.data))
17880  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
17881  */
17882  __pyx_v_failed = locallyRefineEdgeMesh(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
17883 
17884  /* "cmeshTools.pyx":499
17885  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
17886  * <int*>(elementTagArray.data))
17887  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels # <<<<<<<<<<<<<<
17888  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17889  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17890  */
17891  __pyx_t_1 = __pyx_v_cmultilevelMesh->multilevelMesh.nLevels;
17892  __pyx_v_finestLevel = __pyx_t_1;
17893 
17894  /* "cmeshTools.pyx":500
17895  * <int*>(elementTagArray.data))
17896  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
17897  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
17898  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17899  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17900  */
17901  (void)(constructElementBoundaryElementsArray_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
17902 
17903  /* "cmeshTools.pyx":501
17904  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
17905  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17906  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
17907  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17908  * if finestLevel > 1:
17909  */
17910  (void)(allocateGeometricInfo_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
17911 
17912  /* "cmeshTools.pyx":502
17913  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17914  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17915  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
17916  * if finestLevel > 1:
17917  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
17918  */
17919  (void)(computeGeometricInfo_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
17920 
17921  /* "cmeshTools.pyx":503
17922  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17923  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17924  * if finestLevel > 1: # <<<<<<<<<<<<<<
17925  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
17926  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
17927  */
17928  __pyx_t_2 = ((__pyx_v_finestLevel > 1) != 0);
17929  if (__pyx_t_2) {
17930 
17931  /* "cmeshTools.pyx":504
17932  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17933  * if finestLevel > 1:
17934  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2], # <<<<<<<<<<<<<<
17935  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
17936  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
17937  */
17938  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 2)]), (__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)]), (__pyx_v_cmultilevelMesh->multilevelMesh.elementParentsArray[(__pyx_v_finestLevel - 1)]), 1));
17939 
17940  /* "cmeshTools.pyx":503
17941  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17942  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17943  * if finestLevel > 1: # <<<<<<<<<<<<<<
17944  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
17945  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
17946  */
17947  }
17948 
17949  /* "cmeshTools.pyx":496
17950  * int refineTypeFlag=0):
17951  * cdef int failed,finestLevel
17952  * if nSpace == 1: # <<<<<<<<<<<<<<
17953  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
17954  * <int*>(elementTagArray.data))
17955  */
17956  break;
17957  case 2:
17958 
17959  /* "cmeshTools.pyx":509
17960  * 1)
17961  * elif nSpace == 2:
17962  * if refineTypeFlag==1: # <<<<<<<<<<<<<<
17963  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
17964  * <int*>(elementTagArray.data))
17965  */
17966  switch (__pyx_v_refineTypeFlag) {
17967  case 1:
17968 
17969  /* "cmeshTools.pyx":510
17970  * elif nSpace == 2:
17971  * if refineTypeFlag==1:
17972  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
17973  * <int*>(elementTagArray.data))
17974  * elif refineTypeFlag==2:
17975  */
17976  __pyx_v_failed = locallyRefineTriangleMesh_4T(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
17977 
17978  /* "cmeshTools.pyx":509
17979  * 1)
17980  * elif nSpace == 2:
17981  * if refineTypeFlag==1: # <<<<<<<<<<<<<<
17982  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
17983  * <int*>(elementTagArray.data))
17984  */
17985  break;
17986  case 2:
17987 
17988  /* "cmeshTools.pyx":513
17989  * <int*>(elementTagArray.data))
17990  * elif refineTypeFlag==2:
17991  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data)) # <<<<<<<<<<<<<<
17992  * else:
17993  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh,
17994  */
17995  __pyx_v_failed = locallyRefineTriangleMesh_redGreen(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
17996 
17997  /* "cmeshTools.pyx":512
17998  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
17999  * <int*>(elementTagArray.data))
18000  * elif refineTypeFlag==2: # <<<<<<<<<<<<<<
18001  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data))
18002  * else:
18003  */
18004  break;
18005  default:
18006 
18007  /* "cmeshTools.pyx":515
18008  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data))
18009  * else:
18010  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
18011  * <int*>(elementTagArray.data))
18012  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18013  */
18014  __pyx_v_failed = locallyRefineTriangleMesh(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
18015  break;
18016  }
18017 
18018  /* "cmeshTools.pyx":517
18019  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh,
18020  * <int*>(elementTagArray.data))
18021  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels # <<<<<<<<<<<<<<
18022  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18023  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18024  */
18025  __pyx_t_1 = __pyx_v_cmultilevelMesh->multilevelMesh.nLevels;
18026  __pyx_v_finestLevel = __pyx_t_1;
18027 
18028  /* "cmeshTools.pyx":518
18029  * <int*>(elementTagArray.data))
18030  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18031  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18032  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18033  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18034  */
18035  (void)(constructElementBoundaryElementsArray_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18036 
18037  /* "cmeshTools.pyx":519
18038  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18039  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18040  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18041  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18042  * if finestLevel > 1:
18043  */
18044  (void)(allocateGeometricInfo_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18045 
18046  /* "cmeshTools.pyx":520
18047  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18048  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18049  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18050  * if finestLevel > 1:
18051  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18052  */
18053  (void)(computeGeometricInfo_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18054 
18055  /* "cmeshTools.pyx":521
18056  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18057  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18058  * if finestLevel > 1: # <<<<<<<<<<<<<<
18059  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18060  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18061  */
18062  __pyx_t_2 = ((__pyx_v_finestLevel > 1) != 0);
18063  if (__pyx_t_2) {
18064 
18065  /* "cmeshTools.pyx":522
18066  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18067  * if finestLevel > 1:
18068  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2], # <<<<<<<<<<<<<<
18069  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18070  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
18071  */
18072  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 2)]), (__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)]), (__pyx_v_cmultilevelMesh->multilevelMesh.elementParentsArray[(__pyx_v_finestLevel - 1)]), 2));
18073 
18074  /* "cmeshTools.pyx":521
18075  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18076  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18077  * if finestLevel > 1: # <<<<<<<<<<<<<<
18078  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18079  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18080  */
18081  }
18082 
18083  /* "cmeshTools.pyx":508
18084  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
18085  * 1)
18086  * elif nSpace == 2: # <<<<<<<<<<<<<<
18087  * if refineTypeFlag==1:
18088  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
18089  */
18090  break;
18091  default:
18092 
18093  /* "cmeshTools.pyx":527
18094  * 2)
18095  * else:
18096  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace)) # <<<<<<<<<<<<<<
18097  *
18098  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18099  */
18100  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 527, __pyx_L1_error)
18101  __Pyx_GOTREF(__pyx_t_4);
18102  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 527, __pyx_L1_error)
18103  __Pyx_GOTREF(__pyx_t_5);
18104  __pyx_t_6 = NULL;
18105  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18106  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
18107  if (likely(__pyx_t_6)) {
18108  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18109  __Pyx_INCREF(__pyx_t_6);
18110  __Pyx_INCREF(function);
18111  __Pyx_DECREF_SET(__pyx_t_4, function);
18112  }
18113  }
18114  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
18115  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18116  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18117  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 527, __pyx_L1_error)
18118  __Pyx_GOTREF(__pyx_t_3);
18119  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18120  if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(1, 527, __pyx_L1_error)
18121  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18122  break;
18123  }
18124 
18125  /* "cmeshTools.pyx":491
18126  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
18127  *
18128  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
18129  * CMultilevelMesh cmultilevelMesh,
18130  * np.ndarray elementTagArray,
18131  */
18132 
18133  /* function exit code */
18134  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18135  goto __pyx_L0;
18136  __pyx_L1_error:;
18137  __Pyx_XDECREF(__pyx_t_3);
18138  __Pyx_XDECREF(__pyx_t_4);
18139  __Pyx_XDECREF(__pyx_t_5);
18140  __Pyx_XDECREF(__pyx_t_6);
18141  __Pyx_AddTraceback("cmeshTools.locallyRefineMultilevelMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18142  __pyx_r = NULL;
18143  __pyx_L0:;
18144  __Pyx_XGIVEREF(__pyx_r);
18145  __Pyx_RefNannyFinishContext();
18146  return __pyx_r;
18147 }
18148 
18149 /* "cmeshTools.pyx":529
18150  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
18151  *
18152  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
18153  * if nSpace == 2:
18154  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18155  */
18156 
18157 /* Python wrapper */
18158 static PyObject *__pyx_pw_10cmeshTools_69setNewestNodeBases(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18159 static PyMethodDef __pyx_mdef_10cmeshTools_69setNewestNodeBases = {"setNewestNodeBases", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_69setNewestNodeBases, METH_VARARGS|METH_KEYWORDS, 0};
18160 static PyObject *__pyx_pw_10cmeshTools_69setNewestNodeBases(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18161  int __pyx_v_nSpace;
18162  struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh = 0;
18163  PyObject *__pyx_r = 0;
18164  __Pyx_RefNannyDeclarations
18165  __Pyx_RefNannySetupContext("setNewestNodeBases (wrapper)", 0);
18166  {
18167  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_cmultilevelMesh,0};
18168  PyObject* values[2] = {0,0};
18169  if (unlikely(__pyx_kwds)) {
18170  Py_ssize_t kw_args;
18171  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18172  switch (pos_args) {
18173  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18174  CYTHON_FALLTHROUGH;
18175  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18176  CYTHON_FALLTHROUGH;
18177  case 0: break;
18178  default: goto __pyx_L5_argtuple_error;
18179  }
18180  kw_args = PyDict_Size(__pyx_kwds);
18181  switch (pos_args) {
18182  case 0:
18183  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
18184  else goto __pyx_L5_argtuple_error;
18185  CYTHON_FALLTHROUGH;
18186  case 1:
18187  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmultilevelMesh)) != 0)) kw_args--;
18188  else {
18189  __Pyx_RaiseArgtupleInvalid("setNewestNodeBases", 1, 2, 2, 1); __PYX_ERR(1, 529, __pyx_L3_error)
18190  }
18191  }
18192  if (unlikely(kw_args > 0)) {
18193  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNewestNodeBases") < 0)) __PYX_ERR(1, 529, __pyx_L3_error)
18194  }
18195  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18196  goto __pyx_L5_argtuple_error;
18197  } else {
18198  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18199  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18200  }
18201  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 529, __pyx_L3_error)
18202  __pyx_v_cmultilevelMesh = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)values[1]);
18203  }
18204  goto __pyx_L4_argument_unpacking_done;
18205  __pyx_L5_argtuple_error:;
18206  __Pyx_RaiseArgtupleInvalid("setNewestNodeBases", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 529, __pyx_L3_error)
18207  __pyx_L3_error:;
18208  __Pyx_AddTraceback("cmeshTools.setNewestNodeBases", __pyx_clineno, __pyx_lineno, __pyx_filename);
18209  __Pyx_RefNannyFinishContext();
18210  return NULL;
18211  __pyx_L4_argument_unpacking_done:;
18212  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmultilevelMesh), __pyx_ptype_10cmeshTools_CMultilevelMesh, 1, "cmultilevelMesh", 0))) __PYX_ERR(1, 529, __pyx_L1_error)
18213  __pyx_r = __pyx_pf_10cmeshTools_68setNewestNodeBases(__pyx_self, __pyx_v_nSpace, __pyx_v_cmultilevelMesh);
18214 
18215  /* function exit code */
18216  goto __pyx_L0;
18217  __pyx_L1_error:;
18218  __pyx_r = NULL;
18219  __pyx_L0:;
18220  __Pyx_RefNannyFinishContext();
18221  return __pyx_r;
18222 }
18223 
18224 static PyObject *__pyx_pf_10cmeshTools_68setNewestNodeBases(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh) {
18225  CYTHON_UNUSED int __pyx_v_failed;
18226  PyObject *__pyx_r = NULL;
18227  __Pyx_RefNannyDeclarations
18228  int __pyx_t_1;
18229  PyObject *__pyx_t_2 = NULL;
18230  PyObject *__pyx_t_3 = NULL;
18231  PyObject *__pyx_t_4 = NULL;
18232  PyObject *__pyx_t_5 = NULL;
18233  __Pyx_RefNannySetupContext("setNewestNodeBases", 0);
18234 
18235  /* "cmeshTools.pyx":530
18236  *
18237  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18238  * if nSpace == 2: # <<<<<<<<<<<<<<
18239  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18240  * else:
18241  */
18242  __pyx_t_1 = ((__pyx_v_nSpace == 2) != 0);
18243  if (__pyx_t_1) {
18244 
18245  /* "cmeshTools.pyx":531
18246  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18247  * if nSpace == 2:
18248  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh) # <<<<<<<<<<<<<<
18249  * else:
18250  * print("setNewestNodeBases= {0:d} not implemented! Returning".format(nSpace))
18251  */
18252  __pyx_v_failed = setNewestNodeBasesToLongestEdge(__pyx_v_cmultilevelMesh->multilevelMesh);
18253 
18254  /* "cmeshTools.pyx":530
18255  *
18256  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18257  * if nSpace == 2: # <<<<<<<<<<<<<<
18258  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18259  * else:
18260  */
18261  goto __pyx_L3;
18262  }
18263 
18264  /* "cmeshTools.pyx":533
18265  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18266  * else:
18267  * print("setNewestNodeBases= {0:d} not implemented! Returning".format(nSpace)) # <<<<<<<<<<<<<<
18268  */
18269  /*else*/ {
18270  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_setNewestNodeBases_0_d_not_imple, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 533, __pyx_L1_error)
18271  __Pyx_GOTREF(__pyx_t_3);
18272  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 533, __pyx_L1_error)
18273  __Pyx_GOTREF(__pyx_t_4);
18274  __pyx_t_5 = NULL;
18275  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
18276  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
18277  if (likely(__pyx_t_5)) {
18278  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
18279  __Pyx_INCREF(__pyx_t_5);
18280  __Pyx_INCREF(function);
18281  __Pyx_DECREF_SET(__pyx_t_3, function);
18282  }
18283  }
18284  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
18285  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18286  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18287  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 533, __pyx_L1_error)
18288  __Pyx_GOTREF(__pyx_t_2);
18289  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18290  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(1, 533, __pyx_L1_error)
18291  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18292  }
18293  __pyx_L3:;
18294 
18295  /* "cmeshTools.pyx":529
18296  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
18297  *
18298  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
18299  * if nSpace == 2:
18300  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18301  */
18302 
18303  /* function exit code */
18304  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18305  goto __pyx_L0;
18306  __pyx_L1_error:;
18307  __Pyx_XDECREF(__pyx_t_2);
18308  __Pyx_XDECREF(__pyx_t_3);
18309  __Pyx_XDECREF(__pyx_t_4);
18310  __Pyx_XDECREF(__pyx_t_5);
18311  __Pyx_AddTraceback("cmeshTools.setNewestNodeBases", __pyx_clineno, __pyx_lineno, __pyx_filename);
18312  __pyx_r = NULL;
18313  __pyx_L0:;
18314  __Pyx_XGIVEREF(__pyx_r);
18315  __Pyx_RefNannyFinishContext();
18316  return __pyx_r;
18317 }
18318 
18319 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
18320  * # experimental exception made for __getbuffer__ and __releasebuffer__
18321  * # -- the details of this may change.
18322  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
18323  * # This implementation of getbuffer is geared towards Cython
18324  * # requirements, and does not yet fulfill the PEP.
18325  */
18326 
18327 /* Python wrapper */
18328 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
18329 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
18330  int __pyx_r;
18331  __Pyx_RefNannyDeclarations
18332  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
18333  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
18334 
18335  /* function exit code */
18336  __Pyx_RefNannyFinishContext();
18337  return __pyx_r;
18338 }
18339 
18340 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
18341  int __pyx_v_i;
18342  int __pyx_v_ndim;
18343  int __pyx_v_endian_detector;
18344  int __pyx_v_little_endian;
18345  int __pyx_v_t;
18346  char *__pyx_v_f;
18347  PyArray_Descr *__pyx_v_descr = 0;
18348  int __pyx_v_offset;
18349  int __pyx_r;
18350  __Pyx_RefNannyDeclarations
18351  int __pyx_t_1;
18352  int __pyx_t_2;
18353  PyObject *__pyx_t_3 = NULL;
18354  int __pyx_t_4;
18355  int __pyx_t_5;
18356  int __pyx_t_6;
18357  PyArray_Descr *__pyx_t_7;
18358  PyObject *__pyx_t_8 = NULL;
18359  char *__pyx_t_9;
18360  if (__pyx_v_info == NULL) {
18361  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
18362  return -1;
18363  }
18364  __Pyx_RefNannySetupContext("__getbuffer__", 0);
18365  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
18366  __Pyx_GIVEREF(__pyx_v_info->obj);
18367 
18368  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
18369  *
18370  * cdef int i, ndim
18371  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
18372  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
18373  *
18374  */
18375  __pyx_v_endian_detector = 1;
18376 
18377  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
18378  * cdef int i, ndim
18379  * cdef int endian_detector = 1
18380  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
18381  *
18382  * ndim = PyArray_NDIM(self)
18383  */
18384  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
18385 
18386  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
18387  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
18388  *
18389  * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
18390  *
18391  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
18392  */
18393  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
18394 
18395  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
18396  * ndim = PyArray_NDIM(self)
18397  *
18398  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
18399  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18400  * raise ValueError(u"ndarray is not C contiguous")
18401  */
18402  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
18403  if (__pyx_t_2) {
18404  } else {
18405  __pyx_t_1 = __pyx_t_2;
18406  goto __pyx_L4_bool_binop_done;
18407  }
18408 
18409  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
18410  *
18411  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
18412  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
18413  * raise ValueError(u"ndarray is not C contiguous")
18414  *
18415  */
18416  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
18417  __pyx_t_1 = __pyx_t_2;
18418  __pyx_L4_bool_binop_done:;
18419 
18420  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
18421  * ndim = PyArray_NDIM(self)
18422  *
18423  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
18424  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18425  * raise ValueError(u"ndarray is not C contiguous")
18426  */
18427  if (unlikely(__pyx_t_1)) {
18428 
18429  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
18430  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
18431  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18432  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
18433  *
18434  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
18435  */
18436  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 272, __pyx_L1_error)
18437  __Pyx_GOTREF(__pyx_t_3);
18438  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18439  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18440  __PYX_ERR(3, 272, __pyx_L1_error)
18441 
18442  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
18443  * ndim = PyArray_NDIM(self)
18444  *
18445  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
18446  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18447  * raise ValueError(u"ndarray is not C contiguous")
18448  */
18449  }
18450 
18451  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
18452  * raise ValueError(u"ndarray is not C contiguous")
18453  *
18454  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
18455  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18456  * raise ValueError(u"ndarray is not Fortran contiguous")
18457  */
18458  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
18459  if (__pyx_t_2) {
18460  } else {
18461  __pyx_t_1 = __pyx_t_2;
18462  goto __pyx_L7_bool_binop_done;
18463  }
18464 
18465  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
18466  *
18467  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
18468  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
18469  * raise ValueError(u"ndarray is not Fortran contiguous")
18470  *
18471  */
18472  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
18473  __pyx_t_1 = __pyx_t_2;
18474  __pyx_L7_bool_binop_done:;
18475 
18476  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
18477  * raise ValueError(u"ndarray is not C contiguous")
18478  *
18479  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
18480  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18481  * raise ValueError(u"ndarray is not Fortran contiguous")
18482  */
18483  if (unlikely(__pyx_t_1)) {
18484 
18485  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
18486  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
18487  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18488  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
18489  *
18490  * info.buf = PyArray_DATA(self)
18491  */
18492  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 276, __pyx_L1_error)
18493  __Pyx_GOTREF(__pyx_t_3);
18494  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18495  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18496  __PYX_ERR(3, 276, __pyx_L1_error)
18497 
18498  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
18499  * raise ValueError(u"ndarray is not C contiguous")
18500  *
18501  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
18502  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18503  * raise ValueError(u"ndarray is not Fortran contiguous")
18504  */
18505  }
18506 
18507  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
18508  * raise ValueError(u"ndarray is not Fortran contiguous")
18509  *
18510  * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
18511  * info.ndim = ndim
18512  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
18513  */
18514  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
18515 
18516  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
18517  *
18518  * info.buf = PyArray_DATA(self)
18519  * info.ndim = ndim # <<<<<<<<<<<<<<
18520  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
18521  * # Allocate new buffer for strides and shape info.
18522  */
18523  __pyx_v_info->ndim = __pyx_v_ndim;
18524 
18525  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
18526  * info.buf = PyArray_DATA(self)
18527  * info.ndim = ndim
18528  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
18529  * # Allocate new buffer for strides and shape info.
18530  * # This is allocated as one block, strides first.
18531  */
18532  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
18533  if (__pyx_t_1) {
18534 
18535  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
18536  * # Allocate new buffer for strides and shape info.
18537  * # This is allocated as one block, strides first.
18538  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
18539  * info.shape = info.strides + ndim
18540  * for i in range(ndim):
18541  */
18542  __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
18543 
18544  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
18545  * # This is allocated as one block, strides first.
18546  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
18547  * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
18548  * for i in range(ndim):
18549  * info.strides[i] = PyArray_STRIDES(self)[i]
18550  */
18551  __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
18552 
18553  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
18554  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
18555  * info.shape = info.strides + ndim
18556  * for i in range(ndim): # <<<<<<<<<<<<<<
18557  * info.strides[i] = PyArray_STRIDES(self)[i]
18558  * info.shape[i] = PyArray_DIMS(self)[i]
18559  */
18560  __pyx_t_4 = __pyx_v_ndim;
18561  __pyx_t_5 = __pyx_t_4;
18562  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
18563  __pyx_v_i = __pyx_t_6;
18564 
18565  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
18566  * info.shape = info.strides + ndim
18567  * for i in range(ndim):
18568  * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
18569  * info.shape[i] = PyArray_DIMS(self)[i]
18570  * else:
18571  */
18572  (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
18573 
18574  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287
18575  * for i in range(ndim):
18576  * info.strides[i] = PyArray_STRIDES(self)[i]
18577  * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
18578  * else:
18579  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
18580  */
18581  (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
18582  }
18583 
18584  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
18585  * info.buf = PyArray_DATA(self)
18586  * info.ndim = ndim
18587  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
18588  * # Allocate new buffer for strides and shape info.
18589  * # This is allocated as one block, strides first.
18590  */
18591  goto __pyx_L9;
18592  }
18593 
18594  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
18595  * info.shape[i] = PyArray_DIMS(self)[i]
18596  * else:
18597  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
18598  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
18599  * info.suboffsets = NULL
18600  */
18601  /*else*/ {
18602  __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
18603 
18604  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
18605  * else:
18606  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
18607  * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
18608  * info.suboffsets = NULL
18609  * info.itemsize = PyArray_ITEMSIZE(self)
18610  */
18611  __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
18612  }
18613  __pyx_L9:;
18614 
18615  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
18616  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
18617  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
18618  * info.suboffsets = NULL # <<<<<<<<<<<<<<
18619  * info.itemsize = PyArray_ITEMSIZE(self)
18620  * info.readonly = not PyArray_ISWRITEABLE(self)
18621  */
18622  __pyx_v_info->suboffsets = NULL;
18623 
18624  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
18625  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
18626  * info.suboffsets = NULL
18627  * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
18628  * info.readonly = not PyArray_ISWRITEABLE(self)
18629  *
18630  */
18631  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
18632 
18633  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
18634  * info.suboffsets = NULL
18635  * info.itemsize = PyArray_ITEMSIZE(self)
18636  * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
18637  *
18638  * cdef int t
18639  */
18640  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
18641 
18642  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296
18643  *
18644  * cdef int t
18645  * cdef char* f = NULL # <<<<<<<<<<<<<<
18646  * cdef dtype descr = <dtype>PyArray_DESCR(self)
18647  * cdef int offset
18648  */
18649  __pyx_v_f = NULL;
18650 
18651  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
18652  * cdef int t
18653  * cdef char* f = NULL
18654  * cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
18655  * cdef int offset
18656  *
18657  */
18658  __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
18659  __pyx_t_3 = ((PyObject *)__pyx_t_7);
18660  __Pyx_INCREF(__pyx_t_3);
18661  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
18662  __pyx_t_3 = 0;
18663 
18664  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300
18665  * cdef int offset
18666  *
18667  * info.obj = self # <<<<<<<<<<<<<<
18668  *
18669  * if not PyDataType_HASFIELDS(descr):
18670  */
18671  __Pyx_INCREF(((PyObject *)__pyx_v_self));
18672  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
18673  __Pyx_GOTREF(__pyx_v_info->obj);
18674  __Pyx_DECREF(__pyx_v_info->obj);
18675  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
18676 
18677  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
18678  * info.obj = self
18679  *
18680  * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
18681  * t = descr.type_num
18682  * if ((descr.byteorder == c'>' and little_endian) or
18683  */
18684  __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
18685  if (__pyx_t_1) {
18686 
18687  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303
18688  *
18689  * if not PyDataType_HASFIELDS(descr):
18690  * t = descr.type_num # <<<<<<<<<<<<<<
18691  * if ((descr.byteorder == c'>' and little_endian) or
18692  * (descr.byteorder == c'<' and not little_endian)):
18693  */
18694  __pyx_t_4 = __pyx_v_descr->type_num;
18695  __pyx_v_t = __pyx_t_4;
18696 
18697  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
18698  * if not PyDataType_HASFIELDS(descr):
18699  * t = descr.type_num
18700  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
18701  * (descr.byteorder == c'<' and not little_endian)):
18702  * raise ValueError(u"Non-native byte order not supported")
18703  */
18704  __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
18705  if (!__pyx_t_2) {
18706  goto __pyx_L15_next_or;
18707  } else {
18708  }
18709  __pyx_t_2 = (__pyx_v_little_endian != 0);
18710  if (!__pyx_t_2) {
18711  } else {
18712  __pyx_t_1 = __pyx_t_2;
18713  goto __pyx_L14_bool_binop_done;
18714  }
18715  __pyx_L15_next_or:;
18716 
18717  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305
18718  * t = descr.type_num
18719  * if ((descr.byteorder == c'>' and little_endian) or
18720  * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
18721  * raise ValueError(u"Non-native byte order not supported")
18722  * if t == NPY_BYTE: f = "b"
18723  */
18724  __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
18725  if (__pyx_t_2) {
18726  } else {
18727  __pyx_t_1 = __pyx_t_2;
18728  goto __pyx_L14_bool_binop_done;
18729  }
18730  __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
18731  __pyx_t_1 = __pyx_t_2;
18732  __pyx_L14_bool_binop_done:;
18733 
18734  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
18735  * if not PyDataType_HASFIELDS(descr):
18736  * t = descr.type_num
18737  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
18738  * (descr.byteorder == c'<' and not little_endian)):
18739  * raise ValueError(u"Non-native byte order not supported")
18740  */
18741  if (unlikely(__pyx_t_1)) {
18742 
18743  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
18744  * if ((descr.byteorder == c'>' and little_endian) or
18745  * (descr.byteorder == c'<' and not little_endian)):
18746  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
18747  * if t == NPY_BYTE: f = "b"
18748  * elif t == NPY_UBYTE: f = "B"
18749  */
18750  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 306, __pyx_L1_error)
18751  __Pyx_GOTREF(__pyx_t_3);
18752  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18753  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18754  __PYX_ERR(3, 306, __pyx_L1_error)
18755 
18756  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
18757  * if not PyDataType_HASFIELDS(descr):
18758  * t = descr.type_num
18759  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
18760  * (descr.byteorder == c'<' and not little_endian)):
18761  * raise ValueError(u"Non-native byte order not supported")
18762  */
18763  }
18764 
18765  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307
18766  * (descr.byteorder == c'<' and not little_endian)):
18767  * raise ValueError(u"Non-native byte order not supported")
18768  * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
18769  * elif t == NPY_UBYTE: f = "B"
18770  * elif t == NPY_SHORT: f = "h"
18771  */
18772  switch (__pyx_v_t) {
18773  case NPY_BYTE:
18774  __pyx_v_f = ((char *)"b");
18775  break;
18776  case NPY_UBYTE:
18777 
18778  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308
18779  * raise ValueError(u"Non-native byte order not supported")
18780  * if t == NPY_BYTE: f = "b"
18781  * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
18782  * elif t == NPY_SHORT: f = "h"
18783  * elif t == NPY_USHORT: f = "H"
18784  */
18785  __pyx_v_f = ((char *)"B");
18786  break;
18787  case NPY_SHORT:
18788 
18789  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309
18790  * if t == NPY_BYTE: f = "b"
18791  * elif t == NPY_UBYTE: f = "B"
18792  * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
18793  * elif t == NPY_USHORT: f = "H"
18794  * elif t == NPY_INT: f = "i"
18795  */
18796  __pyx_v_f = ((char *)"h");
18797  break;
18798  case NPY_USHORT:
18799 
18800  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310
18801  * elif t == NPY_UBYTE: f = "B"
18802  * elif t == NPY_SHORT: f = "h"
18803  * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
18804  * elif t == NPY_INT: f = "i"
18805  * elif t == NPY_UINT: f = "I"
18806  */
18807  __pyx_v_f = ((char *)"H");
18808  break;
18809  case NPY_INT:
18810 
18811  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311
18812  * elif t == NPY_SHORT: f = "h"
18813  * elif t == NPY_USHORT: f = "H"
18814  * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
18815  * elif t == NPY_UINT: f = "I"
18816  * elif t == NPY_LONG: f = "l"
18817  */
18818  __pyx_v_f = ((char *)"i");
18819  break;
18820  case NPY_UINT:
18821 
18822  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312
18823  * elif t == NPY_USHORT: f = "H"
18824  * elif t == NPY_INT: f = "i"
18825  * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
18826  * elif t == NPY_LONG: f = "l"
18827  * elif t == NPY_ULONG: f = "L"
18828  */
18829  __pyx_v_f = ((char *)"I");
18830  break;
18831  case NPY_LONG:
18832 
18833  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313
18834  * elif t == NPY_INT: f = "i"
18835  * elif t == NPY_UINT: f = "I"
18836  * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
18837  * elif t == NPY_ULONG: f = "L"
18838  * elif t == NPY_LONGLONG: f = "q"
18839  */
18840  __pyx_v_f = ((char *)"l");
18841  break;
18842  case NPY_ULONG:
18843 
18844  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314
18845  * elif t == NPY_UINT: f = "I"
18846  * elif t == NPY_LONG: f = "l"
18847  * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
18848  * elif t == NPY_LONGLONG: f = "q"
18849  * elif t == NPY_ULONGLONG: f = "Q"
18850  */
18851  __pyx_v_f = ((char *)"L");
18852  break;
18853  case NPY_LONGLONG:
18854 
18855  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315
18856  * elif t == NPY_LONG: f = "l"
18857  * elif t == NPY_ULONG: f = "L"
18858  * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
18859  * elif t == NPY_ULONGLONG: f = "Q"
18860  * elif t == NPY_FLOAT: f = "f"
18861  */
18862  __pyx_v_f = ((char *)"q");
18863  break;
18864  case NPY_ULONGLONG:
18865 
18866  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316
18867  * elif t == NPY_ULONG: f = "L"
18868  * elif t == NPY_LONGLONG: f = "q"
18869  * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
18870  * elif t == NPY_FLOAT: f = "f"
18871  * elif t == NPY_DOUBLE: f = "d"
18872  */
18873  __pyx_v_f = ((char *)"Q");
18874  break;
18875  case NPY_FLOAT:
18876 
18877  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317
18878  * elif t == NPY_LONGLONG: f = "q"
18879  * elif t == NPY_ULONGLONG: f = "Q"
18880  * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
18881  * elif t == NPY_DOUBLE: f = "d"
18882  * elif t == NPY_LONGDOUBLE: f = "g"
18883  */
18884  __pyx_v_f = ((char *)"f");
18885  break;
18886  case NPY_DOUBLE:
18887 
18888  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318
18889  * elif t == NPY_ULONGLONG: f = "Q"
18890  * elif t == NPY_FLOAT: f = "f"
18891  * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
18892  * elif t == NPY_LONGDOUBLE: f = "g"
18893  * elif t == NPY_CFLOAT: f = "Zf"
18894  */
18895  __pyx_v_f = ((char *)"d");
18896  break;
18897  case NPY_LONGDOUBLE:
18898 
18899  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319
18900  * elif t == NPY_FLOAT: f = "f"
18901  * elif t == NPY_DOUBLE: f = "d"
18902  * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
18903  * elif t == NPY_CFLOAT: f = "Zf"
18904  * elif t == NPY_CDOUBLE: f = "Zd"
18905  */
18906  __pyx_v_f = ((char *)"g");
18907  break;
18908  case NPY_CFLOAT:
18909 
18910  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320
18911  * elif t == NPY_DOUBLE: f = "d"
18912  * elif t == NPY_LONGDOUBLE: f = "g"
18913  * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
18914  * elif t == NPY_CDOUBLE: f = "Zd"
18915  * elif t == NPY_CLONGDOUBLE: f = "Zg"
18916  */
18917  __pyx_v_f = ((char *)"Zf");
18918  break;
18919  case NPY_CDOUBLE:
18920 
18921  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321
18922  * elif t == NPY_LONGDOUBLE: f = "g"
18923  * elif t == NPY_CFLOAT: f = "Zf"
18924  * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
18925  * elif t == NPY_CLONGDOUBLE: f = "Zg"
18926  * elif t == NPY_OBJECT: f = "O"
18927  */
18928  __pyx_v_f = ((char *)"Zd");
18929  break;
18930  case NPY_CLONGDOUBLE:
18931 
18932  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322
18933  * elif t == NPY_CFLOAT: f = "Zf"
18934  * elif t == NPY_CDOUBLE: f = "Zd"
18935  * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
18936  * elif t == NPY_OBJECT: f = "O"
18937  * else:
18938  */
18939  __pyx_v_f = ((char *)"Zg");
18940  break;
18941  case NPY_OBJECT:
18942 
18943  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323
18944  * elif t == NPY_CDOUBLE: f = "Zd"
18945  * elif t == NPY_CLONGDOUBLE: f = "Zg"
18946  * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
18947  * else:
18948  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
18949  */
18950  __pyx_v_f = ((char *)"O");
18951  break;
18952  default:
18953 
18954  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325
18955  * elif t == NPY_OBJECT: f = "O"
18956  * else:
18957  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
18958  * info.format = f
18959  * return
18960  */
18961  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
18962  __Pyx_GOTREF(__pyx_t_3);
18963  __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 325, __pyx_L1_error)
18964  __Pyx_GOTREF(__pyx_t_8);
18965  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18966  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
18967  __Pyx_GOTREF(__pyx_t_3);
18968  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18969  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18970  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18971  __PYX_ERR(3, 325, __pyx_L1_error)
18972  break;
18973  }
18974 
18975  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326
18976  * else:
18977  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
18978  * info.format = f # <<<<<<<<<<<<<<
18979  * return
18980  * else:
18981  */
18982  __pyx_v_info->format = __pyx_v_f;
18983 
18984  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327
18985  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
18986  * info.format = f
18987  * return # <<<<<<<<<<<<<<
18988  * else:
18989  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
18990  */
18991  __pyx_r = 0;
18992  goto __pyx_L0;
18993 
18994  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
18995  * info.obj = self
18996  *
18997  * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
18998  * t = descr.type_num
18999  * if ((descr.byteorder == c'>' and little_endian) or
19000  */
19001  }
19002 
19003  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329
19004  * return
19005  * else:
19006  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
19007  * info.format[0] = c'^' # Native data types, manual alignment
19008  * offset = 0
19009  */
19010  /*else*/ {
19011  __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
19012 
19013  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330
19014  * else:
19015  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
19016  * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
19017  * offset = 0
19018  * f = _util_dtypestring(descr, info.format + 1,
19019  */
19020  (__pyx_v_info->format[0]) = '^';
19021 
19022  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331
19023  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
19024  * info.format[0] = c'^' # Native data types, manual alignment
19025  * offset = 0 # <<<<<<<<<<<<<<
19026  * f = _util_dtypestring(descr, info.format + 1,
19027  * info.format + _buffer_format_string_len,
19028  */
19029  __pyx_v_offset = 0;
19030 
19031  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332
19032  * info.format[0] = c'^' # Native data types, manual alignment
19033  * offset = 0
19034  * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
19035  * info.format + _buffer_format_string_len,
19036  * &offset)
19037  */
19038  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 332, __pyx_L1_error)
19039  __pyx_v_f = __pyx_t_9;
19040 
19041  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335
19042  * info.format + _buffer_format_string_len,
19043  * &offset)
19044  * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
19045  *
19046  * def __releasebuffer__(ndarray self, Py_buffer* info):
19047  */
19048  (__pyx_v_f[0]) = '\x00';
19049  }
19050 
19051  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
19052  * # experimental exception made for __getbuffer__ and __releasebuffer__
19053  * # -- the details of this may change.
19054  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
19055  * # This implementation of getbuffer is geared towards Cython
19056  * # requirements, and does not yet fulfill the PEP.
19057  */
19058 
19059  /* function exit code */
19060  __pyx_r = 0;
19061  goto __pyx_L0;
19062  __pyx_L1_error:;
19063  __Pyx_XDECREF(__pyx_t_3);
19064  __Pyx_XDECREF(__pyx_t_8);
19065  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19066  __pyx_r = -1;
19067  if (__pyx_v_info->obj != NULL) {
19068  __Pyx_GOTREF(__pyx_v_info->obj);
19069  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
19070  }
19071  goto __pyx_L2;
19072  __pyx_L0:;
19073  if (__pyx_v_info->obj == Py_None) {
19074  __Pyx_GOTREF(__pyx_v_info->obj);
19075  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
19076  }
19077  __pyx_L2:;
19078  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
19079  __Pyx_RefNannyFinishContext();
19080  return __pyx_r;
19081 }
19082 
19083 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
19084  * f[0] = c'\0' # Terminate format string
19085  *
19086  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
19087  * if PyArray_HASFIELDS(self):
19088  * PyObject_Free(info.format)
19089  */
19090 
19091 /* Python wrapper */
19092 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
19093 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
19094  __Pyx_RefNannyDeclarations
19095  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
19096  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
19097 
19098  /* function exit code */
19099  __Pyx_RefNannyFinishContext();
19100 }
19101 
19102 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
19103  __Pyx_RefNannyDeclarations
19104  int __pyx_t_1;
19105  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
19106 
19107  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
19108  *
19109  * def __releasebuffer__(ndarray self, Py_buffer* info):
19110  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
19111  * PyObject_Free(info.format)
19112  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19113  */
19114  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
19115  if (__pyx_t_1) {
19116 
19117  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339
19118  * def __releasebuffer__(ndarray self, Py_buffer* info):
19119  * if PyArray_HASFIELDS(self):
19120  * PyObject_Free(info.format) # <<<<<<<<<<<<<<
19121  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19122  * PyObject_Free(info.strides)
19123  */
19124  PyObject_Free(__pyx_v_info->format);
19125 
19126  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
19127  *
19128  * def __releasebuffer__(ndarray self, Py_buffer* info):
19129  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
19130  * PyObject_Free(info.format)
19131  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19132  */
19133  }
19134 
19135  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
19136  * if PyArray_HASFIELDS(self):
19137  * PyObject_Free(info.format)
19138  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
19139  * PyObject_Free(info.strides)
19140  * # info.shape was stored after info.strides in the same block
19141  */
19142  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
19143  if (__pyx_t_1) {
19144 
19145  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341
19146  * PyObject_Free(info.format)
19147  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19148  * PyObject_Free(info.strides) # <<<<<<<<<<<<<<
19149  * # info.shape was stored after info.strides in the same block
19150  *
19151  */
19152  PyObject_Free(__pyx_v_info->strides);
19153 
19154  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
19155  * if PyArray_HASFIELDS(self):
19156  * PyObject_Free(info.format)
19157  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
19158  * PyObject_Free(info.strides)
19159  * # info.shape was stored after info.strides in the same block
19160  */
19161  }
19162 
19163  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
19164  * f[0] = c'\0' # Terminate format string
19165  *
19166  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
19167  * if PyArray_HASFIELDS(self):
19168  * PyObject_Free(info.format)
19169  */
19170 
19171  /* function exit code */
19172  __Pyx_RefNannyFinishContext();
19173 }
19174 
19175 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
19176  * ctypedef npy_cdouble complex_t
19177  *
19178  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
19179  * return PyArray_MultiIterNew(1, <void*>a)
19180  *
19181  */
19182 
19183 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
19184  PyObject *__pyx_r = NULL;
19185  __Pyx_RefNannyDeclarations
19186  PyObject *__pyx_t_1 = NULL;
19187  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
19188 
19189  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
19190  *
19191  * cdef inline object PyArray_MultiIterNew1(a):
19192  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
19193  *
19194  * cdef inline object PyArray_MultiIterNew2(a, b):
19195  */
19196  __Pyx_XDECREF(__pyx_r);
19197  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 822, __pyx_L1_error)
19198  __Pyx_GOTREF(__pyx_t_1);
19199  __pyx_r = __pyx_t_1;
19200  __pyx_t_1 = 0;
19201  goto __pyx_L0;
19202 
19203  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
19204  * ctypedef npy_cdouble complex_t
19205  *
19206  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
19207  * return PyArray_MultiIterNew(1, <void*>a)
19208  *
19209  */
19210 
19211  /* function exit code */
19212  __pyx_L1_error:;
19213  __Pyx_XDECREF(__pyx_t_1);
19214  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
19215  __pyx_r = 0;
19216  __pyx_L0:;
19217  __Pyx_XGIVEREF(__pyx_r);
19218  __Pyx_RefNannyFinishContext();
19219  return __pyx_r;
19220 }
19221 
19222 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
19223  * return PyArray_MultiIterNew(1, <void*>a)
19224  *
19225  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
19226  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19227  *
19228  */
19229 
19230 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
19231  PyObject *__pyx_r = NULL;
19232  __Pyx_RefNannyDeclarations
19233  PyObject *__pyx_t_1 = NULL;
19234  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
19235 
19236  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825
19237  *
19238  * cdef inline object PyArray_MultiIterNew2(a, b):
19239  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
19240  *
19241  * cdef inline object PyArray_MultiIterNew3(a, b, c):
19242  */
19243  __Pyx_XDECREF(__pyx_r);
19244  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 825, __pyx_L1_error)
19245  __Pyx_GOTREF(__pyx_t_1);
19246  __pyx_r = __pyx_t_1;
19247  __pyx_t_1 = 0;
19248  goto __pyx_L0;
19249 
19250  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
19251  * return PyArray_MultiIterNew(1, <void*>a)
19252  *
19253  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
19254  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19255  *
19256  */
19257 
19258  /* function exit code */
19259  __pyx_L1_error:;
19260  __Pyx_XDECREF(__pyx_t_1);
19261  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
19262  __pyx_r = 0;
19263  __pyx_L0:;
19264  __Pyx_XGIVEREF(__pyx_r);
19265  __Pyx_RefNannyFinishContext();
19266  return __pyx_r;
19267 }
19268 
19269 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
19270  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19271  *
19272  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19273  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19274  *
19275  */
19276 
19277 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
19278  PyObject *__pyx_r = NULL;
19279  __Pyx_RefNannyDeclarations
19280  PyObject *__pyx_t_1 = NULL;
19281  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
19282 
19283  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
19284  *
19285  * cdef inline object PyArray_MultiIterNew3(a, b, c):
19286  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
19287  *
19288  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19289  */
19290  __Pyx_XDECREF(__pyx_r);
19291  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 828, __pyx_L1_error)
19292  __Pyx_GOTREF(__pyx_t_1);
19293  __pyx_r = __pyx_t_1;
19294  __pyx_t_1 = 0;
19295  goto __pyx_L0;
19296 
19297  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
19298  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19299  *
19300  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19301  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19302  *
19303  */
19304 
19305  /* function exit code */
19306  __pyx_L1_error:;
19307  __Pyx_XDECREF(__pyx_t_1);
19308  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19309  __pyx_r = 0;
19310  __pyx_L0:;
19311  __Pyx_XGIVEREF(__pyx_r);
19312  __Pyx_RefNannyFinishContext();
19313  return __pyx_r;
19314 }
19315 
19316 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
19317  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19318  *
19319  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19320  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19321  *
19322  */
19323 
19324 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
19325  PyObject *__pyx_r = NULL;
19326  __Pyx_RefNannyDeclarations
19327  PyObject *__pyx_t_1 = NULL;
19328  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
19329 
19330  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
19331  *
19332  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19333  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
19334  *
19335  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19336  */
19337  __Pyx_XDECREF(__pyx_r);
19338  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 831, __pyx_L1_error)
19339  __Pyx_GOTREF(__pyx_t_1);
19340  __pyx_r = __pyx_t_1;
19341  __pyx_t_1 = 0;
19342  goto __pyx_L0;
19343 
19344  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
19345  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19346  *
19347  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19348  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19349  *
19350  */
19351 
19352  /* function exit code */
19353  __pyx_L1_error:;
19354  __Pyx_XDECREF(__pyx_t_1);
19355  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
19356  __pyx_r = 0;
19357  __pyx_L0:;
19358  __Pyx_XGIVEREF(__pyx_r);
19359  __Pyx_RefNannyFinishContext();
19360  return __pyx_r;
19361 }
19362 
19363 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
19364  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19365  *
19366  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19367  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19368  *
19369  */
19370 
19371 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
19372  PyObject *__pyx_r = NULL;
19373  __Pyx_RefNannyDeclarations
19374  PyObject *__pyx_t_1 = NULL;
19375  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
19376 
19377  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
19378  *
19379  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19380  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
19381  *
19382  * cdef inline tuple PyDataType_SHAPE(dtype d):
19383  */
19384  __Pyx_XDECREF(__pyx_r);
19385  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 834, __pyx_L1_error)
19386  __Pyx_GOTREF(__pyx_t_1);
19387  __pyx_r = __pyx_t_1;
19388  __pyx_t_1 = 0;
19389  goto __pyx_L0;
19390 
19391  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
19392  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19393  *
19394  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19395  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19396  *
19397  */
19398 
19399  /* function exit code */
19400  __pyx_L1_error:;
19401  __Pyx_XDECREF(__pyx_t_1);
19402  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
19403  __pyx_r = 0;
19404  __pyx_L0:;
19405  __Pyx_XGIVEREF(__pyx_r);
19406  __Pyx_RefNannyFinishContext();
19407  return __pyx_r;
19408 }
19409 
19410 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
19411  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19412  *
19413  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19414  * if PyDataType_HASSUBARRAY(d):
19415  * return <tuple>d.subarray.shape
19416  */
19417 
19418 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
19419  PyObject *__pyx_r = NULL;
19420  __Pyx_RefNannyDeclarations
19421  int __pyx_t_1;
19422  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
19423 
19424  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
19425  *
19426  * cdef inline tuple PyDataType_SHAPE(dtype d):
19427  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19428  * return <tuple>d.subarray.shape
19429  * else:
19430  */
19431  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
19432  if (__pyx_t_1) {
19433 
19434  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
19435  * cdef inline tuple PyDataType_SHAPE(dtype d):
19436  * if PyDataType_HASSUBARRAY(d):
19437  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
19438  * else:
19439  * return ()
19440  */
19441  __Pyx_XDECREF(__pyx_r);
19442  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
19443  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
19444  goto __pyx_L0;
19445 
19446  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
19447  *
19448  * cdef inline tuple PyDataType_SHAPE(dtype d):
19449  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19450  * return <tuple>d.subarray.shape
19451  * else:
19452  */
19453  }
19454 
19455  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
19456  * return <tuple>d.subarray.shape
19457  * else:
19458  * return () # <<<<<<<<<<<<<<
19459  *
19460  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
19461  */
19462  /*else*/ {
19463  __Pyx_XDECREF(__pyx_r);
19464  __Pyx_INCREF(__pyx_empty_tuple);
19465  __pyx_r = __pyx_empty_tuple;
19466  goto __pyx_L0;
19467  }
19468 
19469  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
19470  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19471  *
19472  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19473  * if PyDataType_HASSUBARRAY(d):
19474  * return <tuple>d.subarray.shape
19475  */
19476 
19477  /* function exit code */
19478  __pyx_L0:;
19479  __Pyx_XGIVEREF(__pyx_r);
19480  __Pyx_RefNannyFinishContext();
19481  return __pyx_r;
19482 }
19483 
19484 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
19485  * return ()
19486  *
19487  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
19488  * # Recursive utility function used in __getbuffer__ to get format
19489  * # string. The new location in the format string is returned.
19490  */
19491 
19492 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
19493  PyArray_Descr *__pyx_v_child = 0;
19494  int __pyx_v_endian_detector;
19495  int __pyx_v_little_endian;
19496  PyObject *__pyx_v_fields = 0;
19497  PyObject *__pyx_v_childname = NULL;
19498  PyObject *__pyx_v_new_offset = NULL;
19499  PyObject *__pyx_v_t = NULL;
19500  char *__pyx_r;
19501  __Pyx_RefNannyDeclarations
19502  PyObject *__pyx_t_1 = NULL;
19503  Py_ssize_t __pyx_t_2;
19504  PyObject *__pyx_t_3 = NULL;
19505  PyObject *__pyx_t_4 = NULL;
19506  int __pyx_t_5;
19507  int __pyx_t_6;
19508  int __pyx_t_7;
19509  long __pyx_t_8;
19510  char *__pyx_t_9;
19511  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
19512 
19513  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847
19514  *
19515  * cdef dtype child
19516  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
19517  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
19518  * cdef tuple fields
19519  */
19520  __pyx_v_endian_detector = 1;
19521 
19522  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848
19523  * cdef dtype child
19524  * cdef int endian_detector = 1
19525  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
19526  * cdef tuple fields
19527  *
19528  */
19529  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
19530 
19531  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
19532  * cdef tuple fields
19533  *
19534  * for childname in descr.names: # <<<<<<<<<<<<<<
19535  * fields = descr.fields[childname]
19536  * child, new_offset = fields
19537  */
19538  if (unlikely(__pyx_v_descr->names == Py_None)) {
19539  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
19540  __PYX_ERR(3, 851, __pyx_L1_error)
19541  }
19542  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
19543  for (;;) {
19544  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
19545  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19546  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 851, __pyx_L1_error)
19547  #else
19548  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error)
19549  __Pyx_GOTREF(__pyx_t_3);
19550  #endif
19551  __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
19552  __pyx_t_3 = 0;
19553 
19554  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852
19555  *
19556  * for childname in descr.names:
19557  * fields = descr.fields[childname] # <<<<<<<<<<<<<<
19558  * child, new_offset = fields
19559  *
19560  */
19561  if (unlikely(__pyx_v_descr->fields == Py_None)) {
19562  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
19563  __PYX_ERR(3, 852, __pyx_L1_error)
19564  }
19565  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error)
19566  __Pyx_GOTREF(__pyx_t_3);
19567  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 852, __pyx_L1_error)
19568  __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
19569  __pyx_t_3 = 0;
19570 
19571  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853
19572  * for childname in descr.names:
19573  * fields = descr.fields[childname]
19574  * child, new_offset = fields # <<<<<<<<<<<<<<
19575  *
19576  * if (end - f) - <int>(new_offset - offset[0]) < 15:
19577  */
19578  if (likely(__pyx_v_fields != Py_None)) {
19579  PyObject* sequence = __pyx_v_fields;
19580  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
19581  if (unlikely(size != 2)) {
19582  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
19583  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
19584  __PYX_ERR(3, 853, __pyx_L1_error)
19585  }
19586  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19587  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
19588  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
19589  __Pyx_INCREF(__pyx_t_3);
19590  __Pyx_INCREF(__pyx_t_4);
19591  #else
19592  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error)
19593  __Pyx_GOTREF(__pyx_t_3);
19594  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error)
19595  __Pyx_GOTREF(__pyx_t_4);
19596  #endif
19597  } else {
19598  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 853, __pyx_L1_error)
19599  }
19600  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 853, __pyx_L1_error)
19601  __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
19602  __pyx_t_3 = 0;
19603  __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
19604  __pyx_t_4 = 0;
19605 
19606  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
19607  * child, new_offset = fields
19608  *
19609  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
19610  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19611  *
19612  */
19613  __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error)
19614  __Pyx_GOTREF(__pyx_t_4);
19615  __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error)
19616  __Pyx_GOTREF(__pyx_t_3);
19617  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19618  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 855, __pyx_L1_error)
19619  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19620  __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
19621  if (unlikely(__pyx_t_6)) {
19622 
19623  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
19624  *
19625  * if (end - f) - <int>(new_offset - offset[0]) < 15:
19626  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
19627  *
19628  * if ((child.byteorder == c'>' and little_endian) or
19629  */
19630  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 856, __pyx_L1_error)
19631  __Pyx_GOTREF(__pyx_t_3);
19632  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19633  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19634  __PYX_ERR(3, 856, __pyx_L1_error)
19635 
19636  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
19637  * child, new_offset = fields
19638  *
19639  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
19640  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19641  *
19642  */
19643  }
19644 
19645  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
19646  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19647  *
19648  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
19649  * (child.byteorder == c'<' and not little_endian)):
19650  * raise ValueError(u"Non-native byte order not supported")
19651  */
19652  __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
19653  if (!__pyx_t_7) {
19654  goto __pyx_L8_next_or;
19655  } else {
19656  }
19657  __pyx_t_7 = (__pyx_v_little_endian != 0);
19658  if (!__pyx_t_7) {
19659  } else {
19660  __pyx_t_6 = __pyx_t_7;
19661  goto __pyx_L7_bool_binop_done;
19662  }
19663  __pyx_L8_next_or:;
19664 
19665  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859
19666  *
19667  * if ((child.byteorder == c'>' and little_endian) or
19668  * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
19669  * raise ValueError(u"Non-native byte order not supported")
19670  * # One could encode it in the format string and have Cython
19671  */
19672  __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
19673  if (__pyx_t_7) {
19674  } else {
19675  __pyx_t_6 = __pyx_t_7;
19676  goto __pyx_L7_bool_binop_done;
19677  }
19678  __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
19679  __pyx_t_6 = __pyx_t_7;
19680  __pyx_L7_bool_binop_done:;
19681 
19682  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
19683  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19684  *
19685  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
19686  * (child.byteorder == c'<' and not little_endian)):
19687  * raise ValueError(u"Non-native byte order not supported")
19688  */
19689  if (unlikely(__pyx_t_6)) {
19690 
19691  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
19692  * if ((child.byteorder == c'>' and little_endian) or
19693  * (child.byteorder == c'<' and not little_endian)):
19694  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
19695  * # One could encode it in the format string and have Cython
19696  * # complain instead, BUT: < and > in format strings also imply
19697  */
19698  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __pyx_L1_error)
19699  __Pyx_GOTREF(__pyx_t_3);
19700  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19701  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19702  __PYX_ERR(3, 860, __pyx_L1_error)
19703 
19704  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
19705  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19706  *
19707  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
19708  * (child.byteorder == c'<' and not little_endian)):
19709  * raise ValueError(u"Non-native byte order not supported")
19710  */
19711  }
19712 
19713  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870
19714  *
19715  * # Output padding bytes
19716  * while offset[0] < new_offset: # <<<<<<<<<<<<<<
19717  * f[0] = 120 # "x"; pad byte
19718  * f += 1
19719  */
19720  while (1) {
19721  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 870, __pyx_L1_error)
19722  __Pyx_GOTREF(__pyx_t_3);
19723  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 870, __pyx_L1_error)
19724  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19725  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 870, __pyx_L1_error)
19726  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19727  if (!__pyx_t_6) break;
19728 
19729  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871
19730  * # Output padding bytes
19731  * while offset[0] < new_offset:
19732  * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
19733  * f += 1
19734  * offset[0] += 1
19735  */
19736  (__pyx_v_f[0]) = 0x78;
19737 
19738  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872
19739  * while offset[0] < new_offset:
19740  * f[0] = 120 # "x"; pad byte
19741  * f += 1 # <<<<<<<<<<<<<<
19742  * offset[0] += 1
19743  *
19744  */
19745  __pyx_v_f = (__pyx_v_f + 1);
19746 
19747  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873
19748  * f[0] = 120 # "x"; pad byte
19749  * f += 1
19750  * offset[0] += 1 # <<<<<<<<<<<<<<
19751  *
19752  * offset[0] += child.itemsize
19753  */
19754  __pyx_t_8 = 0;
19755  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
19756  }
19757 
19758  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875
19759  * offset[0] += 1
19760  *
19761  * offset[0] += child.itemsize # <<<<<<<<<<<<<<
19762  *
19763  * if not PyDataType_HASFIELDS(child):
19764  */
19765  __pyx_t_8 = 0;
19766  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
19767 
19768  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
19769  * offset[0] += child.itemsize
19770  *
19771  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
19772  * t = child.type_num
19773  * if end - f < 5:
19774  */
19775  __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
19776  if (__pyx_t_6) {
19777 
19778  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878
19779  *
19780  * if not PyDataType_HASFIELDS(child):
19781  * t = child.type_num # <<<<<<<<<<<<<<
19782  * if end - f < 5:
19783  * raise RuntimeError(u"Format string allocated too short.")
19784  */
19785  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error)
19786  __Pyx_GOTREF(__pyx_t_4);
19787  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
19788  __pyx_t_4 = 0;
19789 
19790  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
19791  * if not PyDataType_HASFIELDS(child):
19792  * t = child.type_num
19793  * if end - f < 5: # <<<<<<<<<<<<<<
19794  * raise RuntimeError(u"Format string allocated too short.")
19795  *
19796  */
19797  __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
19798  if (unlikely(__pyx_t_6)) {
19799 
19800  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
19801  * t = child.type_num
19802  * if end - f < 5:
19803  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
19804  *
19805  * # Until ticket #99 is fixed, use integers to avoid warnings
19806  */
19807  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 880, __pyx_L1_error)
19808  __Pyx_GOTREF(__pyx_t_4);
19809  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
19810  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19811  __PYX_ERR(3, 880, __pyx_L1_error)
19812 
19813  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
19814  * if not PyDataType_HASFIELDS(child):
19815  * t = child.type_num
19816  * if end - f < 5: # <<<<<<<<<<<<<<
19817  * raise RuntimeError(u"Format string allocated too short.")
19818  *
19819  */
19820  }
19821 
19822  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883
19823  *
19824  * # Until ticket #99 is fixed, use integers to avoid warnings
19825  * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
19826  * elif t == NPY_UBYTE: f[0] = 66 #"B"
19827  * elif t == NPY_SHORT: f[0] = 104 #"h"
19828  */
19829  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 883, __pyx_L1_error)
19830  __Pyx_GOTREF(__pyx_t_4);
19831  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 883, __pyx_L1_error)
19832  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19833  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 883, __pyx_L1_error)
19834  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19835  if (__pyx_t_6) {
19836  (__pyx_v_f[0]) = 98;
19837  goto __pyx_L15;
19838  }
19839 
19840  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884
19841  * # Until ticket #99 is fixed, use integers to avoid warnings
19842  * if t == NPY_BYTE: f[0] = 98 #"b"
19843  * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
19844  * elif t == NPY_SHORT: f[0] = 104 #"h"
19845  * elif t == NPY_USHORT: f[0] = 72 #"H"
19846  */
19847  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 884, __pyx_L1_error)
19848  __Pyx_GOTREF(__pyx_t_3);
19849  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 884, __pyx_L1_error)
19850  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19851  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 884, __pyx_L1_error)
19852  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19853  if (__pyx_t_6) {
19854  (__pyx_v_f[0]) = 66;
19855  goto __pyx_L15;
19856  }
19857 
19858  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885
19859  * if t == NPY_BYTE: f[0] = 98 #"b"
19860  * elif t == NPY_UBYTE: f[0] = 66 #"B"
19861  * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
19862  * elif t == NPY_USHORT: f[0] = 72 #"H"
19863  * elif t == NPY_INT: f[0] = 105 #"i"
19864  */
19865  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 885, __pyx_L1_error)
19866  __Pyx_GOTREF(__pyx_t_4);
19867  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 885, __pyx_L1_error)
19868  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19869  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 885, __pyx_L1_error)
19870  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19871  if (__pyx_t_6) {
19872  (__pyx_v_f[0]) = 0x68;
19873  goto __pyx_L15;
19874  }
19875 
19876  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886
19877  * elif t == NPY_UBYTE: f[0] = 66 #"B"
19878  * elif t == NPY_SHORT: f[0] = 104 #"h"
19879  * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
19880  * elif t == NPY_INT: f[0] = 105 #"i"
19881  * elif t == NPY_UINT: f[0] = 73 #"I"
19882  */
19883  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 886, __pyx_L1_error)
19884  __Pyx_GOTREF(__pyx_t_3);
19885  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 886, __pyx_L1_error)
19886  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19887  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 886, __pyx_L1_error)
19888  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19889  if (__pyx_t_6) {
19890  (__pyx_v_f[0]) = 72;
19891  goto __pyx_L15;
19892  }
19893 
19894  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887
19895  * elif t == NPY_SHORT: f[0] = 104 #"h"
19896  * elif t == NPY_USHORT: f[0] = 72 #"H"
19897  * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
19898  * elif t == NPY_UINT: f[0] = 73 #"I"
19899  * elif t == NPY_LONG: f[0] = 108 #"l"
19900  */
19901  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 887, __pyx_L1_error)
19902  __Pyx_GOTREF(__pyx_t_4);
19903  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 887, __pyx_L1_error)
19904  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19905  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 887, __pyx_L1_error)
19906  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19907  if (__pyx_t_6) {
19908  (__pyx_v_f[0]) = 0x69;
19909  goto __pyx_L15;
19910  }
19911 
19912  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888
19913  * elif t == NPY_USHORT: f[0] = 72 #"H"
19914  * elif t == NPY_INT: f[0] = 105 #"i"
19915  * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
19916  * elif t == NPY_LONG: f[0] = 108 #"l"
19917  * elif t == NPY_ULONG: f[0] = 76 #"L"
19918  */
19919  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 888, __pyx_L1_error)
19920  __Pyx_GOTREF(__pyx_t_3);
19921  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 888, __pyx_L1_error)
19922  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19923  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 888, __pyx_L1_error)
19924  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19925  if (__pyx_t_6) {
19926  (__pyx_v_f[0]) = 73;
19927  goto __pyx_L15;
19928  }
19929 
19930  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889
19931  * elif t == NPY_INT: f[0] = 105 #"i"
19932  * elif t == NPY_UINT: f[0] = 73 #"I"
19933  * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
19934  * elif t == NPY_ULONG: f[0] = 76 #"L"
19935  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
19936  */
19937  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 889, __pyx_L1_error)
19938  __Pyx_GOTREF(__pyx_t_4);
19939  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 889, __pyx_L1_error)
19940  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19941  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 889, __pyx_L1_error)
19942  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19943  if (__pyx_t_6) {
19944  (__pyx_v_f[0]) = 0x6C;
19945  goto __pyx_L15;
19946  }
19947 
19948  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890
19949  * elif t == NPY_UINT: f[0] = 73 #"I"
19950  * elif t == NPY_LONG: f[0] = 108 #"l"
19951  * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
19952  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
19953  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
19954  */
19955  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 890, __pyx_L1_error)
19956  __Pyx_GOTREF(__pyx_t_3);
19957  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error)
19958  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19959  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 890, __pyx_L1_error)
19960  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19961  if (__pyx_t_6) {
19962  (__pyx_v_f[0]) = 76;
19963  goto __pyx_L15;
19964  }
19965 
19966  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891
19967  * elif t == NPY_LONG: f[0] = 108 #"l"
19968  * elif t == NPY_ULONG: f[0] = 76 #"L"
19969  * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
19970  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
19971  * elif t == NPY_FLOAT: f[0] = 102 #"f"
19972  */
19973  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 891, __pyx_L1_error)
19974  __Pyx_GOTREF(__pyx_t_4);
19975  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 891, __pyx_L1_error)
19976  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19977  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 891, __pyx_L1_error)
19978  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19979  if (__pyx_t_6) {
19980  (__pyx_v_f[0]) = 0x71;
19981  goto __pyx_L15;
19982  }
19983 
19984  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892
19985  * elif t == NPY_ULONG: f[0] = 76 #"L"
19986  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
19987  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
19988  * elif t == NPY_FLOAT: f[0] = 102 #"f"
19989  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
19990  */
19991  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 892, __pyx_L1_error)
19992  __Pyx_GOTREF(__pyx_t_3);
19993  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 892, __pyx_L1_error)
19994  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19995  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 892, __pyx_L1_error)
19996  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19997  if (__pyx_t_6) {
19998  (__pyx_v_f[0]) = 81;
19999  goto __pyx_L15;
20000  }
20001 
20002  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893
20003  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
20004  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
20005  * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
20006  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
20007  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
20008  */
20009  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 893, __pyx_L1_error)
20010  __Pyx_GOTREF(__pyx_t_4);
20011  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 893, __pyx_L1_error)
20012  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20013  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 893, __pyx_L1_error)
20014  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20015  if (__pyx_t_6) {
20016  (__pyx_v_f[0]) = 0x66;
20017  goto __pyx_L15;
20018  }
20019 
20020  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894
20021  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
20022  * elif t == NPY_FLOAT: f[0] = 102 #"f"
20023  * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
20024  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
20025  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20026  */
20027  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 894, __pyx_L1_error)
20028  __Pyx_GOTREF(__pyx_t_3);
20029  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 894, __pyx_L1_error)
20030  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20031  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 894, __pyx_L1_error)
20032  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20033  if (__pyx_t_6) {
20034  (__pyx_v_f[0]) = 0x64;
20035  goto __pyx_L15;
20036  }
20037 
20038  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895
20039  * elif t == NPY_FLOAT: f[0] = 102 #"f"
20040  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
20041  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
20042  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20043  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20044  */
20045  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 895, __pyx_L1_error)
20046  __Pyx_GOTREF(__pyx_t_4);
20047  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error)
20048  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20049  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 895, __pyx_L1_error)
20050  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20051  if (__pyx_t_6) {
20052  (__pyx_v_f[0]) = 0x67;
20053  goto __pyx_L15;
20054  }
20055 
20056  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896
20057  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
20058  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
20059  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
20060  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20061  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
20062  */
20063  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 896, __pyx_L1_error)
20064  __Pyx_GOTREF(__pyx_t_3);
20065  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 896, __pyx_L1_error)
20066  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20067  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 896, __pyx_L1_error)
20068  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20069  if (__pyx_t_6) {
20070  (__pyx_v_f[0]) = 90;
20071  (__pyx_v_f[1]) = 0x66;
20072  __pyx_v_f = (__pyx_v_f + 1);
20073  goto __pyx_L15;
20074  }
20075 
20076  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897
20077  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
20078  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20079  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
20080  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
20081  * elif t == NPY_OBJECT: f[0] = 79 #"O"
20082  */
20083  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error)
20084  __Pyx_GOTREF(__pyx_t_4);
20085  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error)
20086  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20087  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 897, __pyx_L1_error)
20088  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20089  if (__pyx_t_6) {
20090  (__pyx_v_f[0]) = 90;
20091  (__pyx_v_f[1]) = 0x64;
20092  __pyx_v_f = (__pyx_v_f + 1);
20093  goto __pyx_L15;
20094  }
20095 
20096  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898
20097  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20098  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20099  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
20100  * elif t == NPY_OBJECT: f[0] = 79 #"O"
20101  * else:
20102  */
20103  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 898, __pyx_L1_error)
20104  __Pyx_GOTREF(__pyx_t_3);
20105  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 898, __pyx_L1_error)
20106  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20107  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 898, __pyx_L1_error)
20108  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20109  if (__pyx_t_6) {
20110  (__pyx_v_f[0]) = 90;
20111  (__pyx_v_f[1]) = 0x67;
20112  __pyx_v_f = (__pyx_v_f + 1);
20113  goto __pyx_L15;
20114  }
20115 
20116  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899
20117  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20118  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
20119  * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
20120  * else:
20121  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
20122  */
20123  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 899, __pyx_L1_error)
20124  __Pyx_GOTREF(__pyx_t_4);
20125  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 899, __pyx_L1_error)
20126  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20127  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 899, __pyx_L1_error)
20128  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20129  if (likely(__pyx_t_6)) {
20130  (__pyx_v_f[0]) = 79;
20131  goto __pyx_L15;
20132  }
20133 
20134  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901
20135  * elif t == NPY_OBJECT: f[0] = 79 #"O"
20136  * else:
20137  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
20138  * f += 1
20139  * else:
20140  */
20141  /*else*/ {
20142  __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 901, __pyx_L1_error)
20143  __Pyx_GOTREF(__pyx_t_3);
20144  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 901, __pyx_L1_error)
20145  __Pyx_GOTREF(__pyx_t_4);
20146  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20147  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
20148  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20149  __PYX_ERR(3, 901, __pyx_L1_error)
20150  }
20151  __pyx_L15:;
20152 
20153  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902
20154  * else:
20155  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
20156  * f += 1 # <<<<<<<<<<<<<<
20157  * else:
20158  * # Cython ignores struct boundary information ("T{...}"),
20159  */
20160  __pyx_v_f = (__pyx_v_f + 1);
20161 
20162  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
20163  * offset[0] += child.itemsize
20164  *
20165  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
20166  * t = child.type_num
20167  * if end - f < 5:
20168  */
20169  goto __pyx_L13;
20170  }
20171 
20172  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906
20173  * # Cython ignores struct boundary information ("T{...}"),
20174  * # so don't output it
20175  * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
20176  * return f
20177  *
20178  */
20179  /*else*/ {
20180  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 906, __pyx_L1_error)
20181  __pyx_v_f = __pyx_t_9;
20182  }
20183  __pyx_L13:;
20184 
20185  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
20186  * cdef tuple fields
20187  *
20188  * for childname in descr.names: # <<<<<<<<<<<<<<
20189  * fields = descr.fields[childname]
20190  * child, new_offset = fields
20191  */
20192  }
20193  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20194 
20195  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907
20196  * # so don't output it
20197  * f = _util_dtypestring(child, f, end, offset)
20198  * return f # <<<<<<<<<<<<<<
20199  *
20200  *
20201  */
20202  __pyx_r = __pyx_v_f;
20203  goto __pyx_L0;
20204 
20205  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
20206  * return ()
20207  *
20208  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
20209  * # Recursive utility function used in __getbuffer__ to get format
20210  * # string. The new location in the format string is returned.
20211  */
20212 
20213  /* function exit code */
20214  __pyx_L1_error:;
20215  __Pyx_XDECREF(__pyx_t_1);
20216  __Pyx_XDECREF(__pyx_t_3);
20217  __Pyx_XDECREF(__pyx_t_4);
20218  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
20219  __pyx_r = NULL;
20220  __pyx_L0:;
20221  __Pyx_XDECREF((PyObject *)__pyx_v_child);
20222  __Pyx_XDECREF(__pyx_v_fields);
20223  __Pyx_XDECREF(__pyx_v_childname);
20224  __Pyx_XDECREF(__pyx_v_new_offset);
20225  __Pyx_XDECREF(__pyx_v_t);
20226  __Pyx_RefNannyFinishContext();
20227  return __pyx_r;
20228 }
20229 
20230 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
20231  * int _import_umath() except -1
20232  *
20233  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
20234  * Py_INCREF(base) # important to do this before stealing the reference below!
20235  * PyArray_SetBaseObject(arr, base)
20236  */
20237 
20238 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
20239  __Pyx_RefNannyDeclarations
20240  __Pyx_RefNannySetupContext("set_array_base", 0);
20241 
20242  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023
20243  *
20244  * cdef inline void set_array_base(ndarray arr, object base):
20245  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
20246  * PyArray_SetBaseObject(arr, base)
20247  *
20248  */
20249  Py_INCREF(__pyx_v_base);
20250 
20251  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024
20252  * cdef inline void set_array_base(ndarray arr, object base):
20253  * Py_INCREF(base) # important to do this before stealing the reference below!
20254  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
20255  *
20256  * cdef inline object get_array_base(ndarray arr):
20257  */
20258  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
20259 
20260  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
20261  * int _import_umath() except -1
20262  *
20263  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
20264  * Py_INCREF(base) # important to do this before stealing the reference below!
20265  * PyArray_SetBaseObject(arr, base)
20266  */
20267 
20268  /* function exit code */
20269  __Pyx_RefNannyFinishContext();
20270 }
20271 
20272 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
20273  * PyArray_SetBaseObject(arr, base)
20274  *
20275  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
20276  * base = PyArray_BASE(arr)
20277  * if base is NULL:
20278  */
20279 
20280 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
20281  PyObject *__pyx_v_base;
20282  PyObject *__pyx_r = NULL;
20283  __Pyx_RefNannyDeclarations
20284  int __pyx_t_1;
20285  __Pyx_RefNannySetupContext("get_array_base", 0);
20286 
20287  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027
20288  *
20289  * cdef inline object get_array_base(ndarray arr):
20290  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
20291  * if base is NULL:
20292  * return None
20293  */
20294  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
20295 
20296  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
20297  * cdef inline object get_array_base(ndarray arr):
20298  * base = PyArray_BASE(arr)
20299  * if base is NULL: # <<<<<<<<<<<<<<
20300  * return None
20301  * return <object>base
20302  */
20303  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
20304  if (__pyx_t_1) {
20305 
20306  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029
20307  * base = PyArray_BASE(arr)
20308  * if base is NULL:
20309  * return None # <<<<<<<<<<<<<<
20310  * return <object>base
20311  *
20312  */
20313  __Pyx_XDECREF(__pyx_r);
20314  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20315  goto __pyx_L0;
20316 
20317  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
20318  * cdef inline object get_array_base(ndarray arr):
20319  * base = PyArray_BASE(arr)
20320  * if base is NULL: # <<<<<<<<<<<<<<
20321  * return None
20322  * return <object>base
20323  */
20324  }
20325 
20326  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030
20327  * if base is NULL:
20328  * return None
20329  * return <object>base # <<<<<<<<<<<<<<
20330  *
20331  * # Versions of the import_* functions which are more suitable for
20332  */
20333  __Pyx_XDECREF(__pyx_r);
20334  __Pyx_INCREF(((PyObject *)__pyx_v_base));
20335  __pyx_r = ((PyObject *)__pyx_v_base);
20336  goto __pyx_L0;
20337 
20338  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
20339  * PyArray_SetBaseObject(arr, base)
20340  *
20341  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
20342  * base = PyArray_BASE(arr)
20343  * if base is NULL:
20344  */
20345 
20346  /* function exit code */
20347  __pyx_L0:;
20348  __Pyx_XGIVEREF(__pyx_r);
20349  __Pyx_RefNannyFinishContext();
20350  return __pyx_r;
20351 }
20352 
20353 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
20354  * # Versions of the import_* functions which are more suitable for
20355  * # Cython code.
20356  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
20357  * try:
20358  * _import_array()
20359  */
20360 
20361 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
20362  int __pyx_r;
20363  __Pyx_RefNannyDeclarations
20364  PyObject *__pyx_t_1 = NULL;
20365  PyObject *__pyx_t_2 = NULL;
20366  PyObject *__pyx_t_3 = NULL;
20367  int __pyx_t_4;
20368  PyObject *__pyx_t_5 = NULL;
20369  PyObject *__pyx_t_6 = NULL;
20370  PyObject *__pyx_t_7 = NULL;
20371  PyObject *__pyx_t_8 = NULL;
20372  __Pyx_RefNannySetupContext("import_array", 0);
20373 
20374  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
20375  * # Cython code.
20376  * cdef inline int import_array() except -1:
20377  * try: # <<<<<<<<<<<<<<
20378  * _import_array()
20379  * except Exception:
20380  */
20381  {
20382  __Pyx_PyThreadState_declare
20383  __Pyx_PyThreadState_assign
20384  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20385  __Pyx_XGOTREF(__pyx_t_1);
20386  __Pyx_XGOTREF(__pyx_t_2);
20387  __Pyx_XGOTREF(__pyx_t_3);
20388  /*try:*/ {
20389 
20390  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036
20391  * cdef inline int import_array() except -1:
20392  * try:
20393  * _import_array() # <<<<<<<<<<<<<<
20394  * except Exception:
20395  * raise ImportError("numpy.core.multiarray failed to import")
20396  */
20397  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1036, __pyx_L3_error)
20398 
20399  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
20400  * # Cython code.
20401  * cdef inline int import_array() except -1:
20402  * try: # <<<<<<<<<<<<<<
20403  * _import_array()
20404  * except Exception:
20405  */
20406  }
20407  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20408  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20409  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20410  goto __pyx_L8_try_end;
20411  __pyx_L3_error:;
20412 
20413  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037
20414  * try:
20415  * _import_array()
20416  * except Exception: # <<<<<<<<<<<<<<
20417  * raise ImportError("numpy.core.multiarray failed to import")
20418  *
20419  */
20420  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20421  if (__pyx_t_4) {
20422  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
20423  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1037, __pyx_L5_except_error)
20424  __Pyx_GOTREF(__pyx_t_5);
20425  __Pyx_GOTREF(__pyx_t_6);
20426  __Pyx_GOTREF(__pyx_t_7);
20427 
20428  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
20429  * _import_array()
20430  * except Exception:
20431  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
20432  *
20433  * cdef inline int import_umath() except -1:
20434  */
20435  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1038, __pyx_L5_except_error)
20436  __Pyx_GOTREF(__pyx_t_8);
20437  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20438  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20439  __PYX_ERR(3, 1038, __pyx_L5_except_error)
20440  }
20441  goto __pyx_L5_except_error;
20442  __pyx_L5_except_error:;
20443 
20444  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
20445  * # Cython code.
20446  * cdef inline int import_array() except -1:
20447  * try: # <<<<<<<<<<<<<<
20448  * _import_array()
20449  * except Exception:
20450  */
20451  __Pyx_XGIVEREF(__pyx_t_1);
20452  __Pyx_XGIVEREF(__pyx_t_2);
20453  __Pyx_XGIVEREF(__pyx_t_3);
20454  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20455  goto __pyx_L1_error;
20456  __pyx_L8_try_end:;
20457  }
20458 
20459  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
20460  * # Versions of the import_* functions which are more suitable for
20461  * # Cython code.
20462  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
20463  * try:
20464  * _import_array()
20465  */
20466 
20467  /* function exit code */
20468  __pyx_r = 0;
20469  goto __pyx_L0;
20470  __pyx_L1_error:;
20471  __Pyx_XDECREF(__pyx_t_5);
20472  __Pyx_XDECREF(__pyx_t_6);
20473  __Pyx_XDECREF(__pyx_t_7);
20474  __Pyx_XDECREF(__pyx_t_8);
20475  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
20476  __pyx_r = -1;
20477  __pyx_L0:;
20478  __Pyx_RefNannyFinishContext();
20479  return __pyx_r;
20480 }
20481 
20482 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
20483  * raise ImportError("numpy.core.multiarray failed to import")
20484  *
20485  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
20486  * try:
20487  * _import_umath()
20488  */
20489 
20490 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
20491  int __pyx_r;
20492  __Pyx_RefNannyDeclarations
20493  PyObject *__pyx_t_1 = NULL;
20494  PyObject *__pyx_t_2 = NULL;
20495  PyObject *__pyx_t_3 = NULL;
20496  int __pyx_t_4;
20497  PyObject *__pyx_t_5 = NULL;
20498  PyObject *__pyx_t_6 = NULL;
20499  PyObject *__pyx_t_7 = NULL;
20500  PyObject *__pyx_t_8 = NULL;
20501  __Pyx_RefNannySetupContext("import_umath", 0);
20502 
20503  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
20504  *
20505  * cdef inline int import_umath() except -1:
20506  * try: # <<<<<<<<<<<<<<
20507  * _import_umath()
20508  * except Exception:
20509  */
20510  {
20511  __Pyx_PyThreadState_declare
20512  __Pyx_PyThreadState_assign
20513  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20514  __Pyx_XGOTREF(__pyx_t_1);
20515  __Pyx_XGOTREF(__pyx_t_2);
20516  __Pyx_XGOTREF(__pyx_t_3);
20517  /*try:*/ {
20518 
20519  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042
20520  * cdef inline int import_umath() except -1:
20521  * try:
20522  * _import_umath() # <<<<<<<<<<<<<<
20523  * except Exception:
20524  * raise ImportError("numpy.core.umath failed to import")
20525  */
20526  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1042, __pyx_L3_error)
20527 
20528  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
20529  *
20530  * cdef inline int import_umath() except -1:
20531  * try: # <<<<<<<<<<<<<<
20532  * _import_umath()
20533  * except Exception:
20534  */
20535  }
20536  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20537  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20538  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20539  goto __pyx_L8_try_end;
20540  __pyx_L3_error:;
20541 
20542  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043
20543  * try:
20544  * _import_umath()
20545  * except Exception: # <<<<<<<<<<<<<<
20546  * raise ImportError("numpy.core.umath failed to import")
20547  *
20548  */
20549  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20550  if (__pyx_t_4) {
20551  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
20552  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1043, __pyx_L5_except_error)
20553  __Pyx_GOTREF(__pyx_t_5);
20554  __Pyx_GOTREF(__pyx_t_6);
20555  __Pyx_GOTREF(__pyx_t_7);
20556 
20557  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
20558  * _import_umath()
20559  * except Exception:
20560  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
20561  *
20562  * cdef inline int import_ufunc() except -1:
20563  */
20564  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1044, __pyx_L5_except_error)
20565  __Pyx_GOTREF(__pyx_t_8);
20566  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20567  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20568  __PYX_ERR(3, 1044, __pyx_L5_except_error)
20569  }
20570  goto __pyx_L5_except_error;
20571  __pyx_L5_except_error:;
20572 
20573  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
20574  *
20575  * cdef inline int import_umath() except -1:
20576  * try: # <<<<<<<<<<<<<<
20577  * _import_umath()
20578  * except Exception:
20579  */
20580  __Pyx_XGIVEREF(__pyx_t_1);
20581  __Pyx_XGIVEREF(__pyx_t_2);
20582  __Pyx_XGIVEREF(__pyx_t_3);
20583  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20584  goto __pyx_L1_error;
20585  __pyx_L8_try_end:;
20586  }
20587 
20588  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
20589  * raise ImportError("numpy.core.multiarray failed to import")
20590  *
20591  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
20592  * try:
20593  * _import_umath()
20594  */
20595 
20596  /* function exit code */
20597  __pyx_r = 0;
20598  goto __pyx_L0;
20599  __pyx_L1_error:;
20600  __Pyx_XDECREF(__pyx_t_5);
20601  __Pyx_XDECREF(__pyx_t_6);
20602  __Pyx_XDECREF(__pyx_t_7);
20603  __Pyx_XDECREF(__pyx_t_8);
20604  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
20605  __pyx_r = -1;
20606  __pyx_L0:;
20607  __Pyx_RefNannyFinishContext();
20608  return __pyx_r;
20609 }
20610 
20611 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
20612  * raise ImportError("numpy.core.umath failed to import")
20613  *
20614  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
20615  * try:
20616  * _import_umath()
20617  */
20618 
20619 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
20620  int __pyx_r;
20621  __Pyx_RefNannyDeclarations
20622  PyObject *__pyx_t_1 = NULL;
20623  PyObject *__pyx_t_2 = NULL;
20624  PyObject *__pyx_t_3 = NULL;
20625  int __pyx_t_4;
20626  PyObject *__pyx_t_5 = NULL;
20627  PyObject *__pyx_t_6 = NULL;
20628  PyObject *__pyx_t_7 = NULL;
20629  PyObject *__pyx_t_8 = NULL;
20630  __Pyx_RefNannySetupContext("import_ufunc", 0);
20631 
20632  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
20633  *
20634  * cdef inline int import_ufunc() except -1:
20635  * try: # <<<<<<<<<<<<<<
20636  * _import_umath()
20637  * except Exception:
20638  */
20639  {
20640  __Pyx_PyThreadState_declare
20641  __Pyx_PyThreadState_assign
20642  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20643  __Pyx_XGOTREF(__pyx_t_1);
20644  __Pyx_XGOTREF(__pyx_t_2);
20645  __Pyx_XGOTREF(__pyx_t_3);
20646  /*try:*/ {
20647 
20648  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048
20649  * cdef inline int import_ufunc() except -1:
20650  * try:
20651  * _import_umath() # <<<<<<<<<<<<<<
20652  * except Exception:
20653  * raise ImportError("numpy.core.umath failed to import")
20654  */
20655  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1048, __pyx_L3_error)
20656 
20657  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
20658  *
20659  * cdef inline int import_ufunc() except -1:
20660  * try: # <<<<<<<<<<<<<<
20661  * _import_umath()
20662  * except Exception:
20663  */
20664  }
20665  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20666  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20667  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20668  goto __pyx_L8_try_end;
20669  __pyx_L3_error:;
20670 
20671  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049
20672  * try:
20673  * _import_umath()
20674  * except Exception: # <<<<<<<<<<<<<<
20675  * raise ImportError("numpy.core.umath failed to import")
20676  */
20677  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20678  if (__pyx_t_4) {
20679  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
20680  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1049, __pyx_L5_except_error)
20681  __Pyx_GOTREF(__pyx_t_5);
20682  __Pyx_GOTREF(__pyx_t_6);
20683  __Pyx_GOTREF(__pyx_t_7);
20684 
20685  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050
20686  * _import_umath()
20687  * except Exception:
20688  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
20689  */
20690  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1050, __pyx_L5_except_error)
20691  __Pyx_GOTREF(__pyx_t_8);
20692  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20693  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20694  __PYX_ERR(3, 1050, __pyx_L5_except_error)
20695  }
20696  goto __pyx_L5_except_error;
20697  __pyx_L5_except_error:;
20698 
20699  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
20700  *
20701  * cdef inline int import_ufunc() except -1:
20702  * try: # <<<<<<<<<<<<<<
20703  * _import_umath()
20704  * except Exception:
20705  */
20706  __Pyx_XGIVEREF(__pyx_t_1);
20707  __Pyx_XGIVEREF(__pyx_t_2);
20708  __Pyx_XGIVEREF(__pyx_t_3);
20709  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20710  goto __pyx_L1_error;
20711  __pyx_L8_try_end:;
20712  }
20713 
20714  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
20715  * raise ImportError("numpy.core.umath failed to import")
20716  *
20717  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
20718  * try:
20719  * _import_umath()
20720  */
20721 
20722  /* function exit code */
20723  __pyx_r = 0;
20724  goto __pyx_L0;
20725  __pyx_L1_error:;
20726  __Pyx_XDECREF(__pyx_t_5);
20727  __Pyx_XDECREF(__pyx_t_6);
20728  __Pyx_XDECREF(__pyx_t_7);
20729  __Pyx_XDECREF(__pyx_t_8);
20730  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
20731  __pyx_r = -1;
20732  __pyx_L0:;
20733  __Pyx_RefNannyFinishContext();
20734  return __pyx_r;
20735 }
20736 
20737 /* "View.MemoryView":122
20738  * cdef bint dtype_is_object
20739  *
20740  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
20741  * mode="c", bint allocate_buffer=True):
20742  *
20743  */
20744 
20745 /* Python wrapper */
20746 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20747 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20748  PyObject *__pyx_v_shape = 0;
20749  Py_ssize_t __pyx_v_itemsize;
20750  PyObject *__pyx_v_format = 0;
20751  PyObject *__pyx_v_mode = 0;
20752  int __pyx_v_allocate_buffer;
20753  int __pyx_r;
20754  __Pyx_RefNannyDeclarations
20755  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
20756  {
20757  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
20758  PyObject* values[5] = {0,0,0,0,0};
20759  values[3] = ((PyObject *)__pyx_n_s_c);
20760  if (unlikely(__pyx_kwds)) {
20761  Py_ssize_t kw_args;
20762  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20763  switch (pos_args) {
20764  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20765  CYTHON_FALLTHROUGH;
20766  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20767  CYTHON_FALLTHROUGH;
20768  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20769  CYTHON_FALLTHROUGH;
20770  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20771  CYTHON_FALLTHROUGH;
20772  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20773  CYTHON_FALLTHROUGH;
20774  case 0: break;
20775  default: goto __pyx_L5_argtuple_error;
20776  }
20777  kw_args = PyDict_Size(__pyx_kwds);
20778  switch (pos_args) {
20779  case 0:
20780  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
20781  else goto __pyx_L5_argtuple_error;
20782  CYTHON_FALLTHROUGH;
20783  case 1:
20784  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
20785  else {
20786  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
20787  }
20788  CYTHON_FALLTHROUGH;
20789  case 2:
20790  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
20791  else {
20792  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
20793  }
20794  CYTHON_FALLTHROUGH;
20795  case 3:
20796  if (kw_args > 0) {
20797  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
20798  if (value) { values[3] = value; kw_args--; }
20799  }
20800  CYTHON_FALLTHROUGH;
20801  case 4:
20802  if (kw_args > 0) {
20803  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
20804  if (value) { values[4] = value; kw_args--; }
20805  }
20806  }
20807  if (unlikely(kw_args > 0)) {
20808  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
20809  }
20810  } else {
20811  switch (PyTuple_GET_SIZE(__pyx_args)) {
20812  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20813  CYTHON_FALLTHROUGH;
20814  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20815  CYTHON_FALLTHROUGH;
20816  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20817  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20818  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20819  break;
20820  default: goto __pyx_L5_argtuple_error;
20821  }
20822  }
20823  __pyx_v_shape = ((PyObject*)values[0]);
20824  __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
20825  __pyx_v_format = values[2];
20826  __pyx_v_mode = values[3];
20827  if (values[4]) {
20828  __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error)
20829  } else {
20830 
20831  /* "View.MemoryView":123
20832  *
20833  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
20834  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
20835  *
20836  * cdef int idx
20837  */
20838  __pyx_v_allocate_buffer = ((int)1);
20839  }
20840  }
20841  goto __pyx_L4_argument_unpacking_done;
20842  __pyx_L5_argtuple_error:;
20843  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
20844  __pyx_L3_error:;
20845  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20846  __Pyx_RefNannyFinishContext();
20847  return -1;
20848  __pyx_L4_argument_unpacking_done:;
20849  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(0, 122, __pyx_L1_error)
20850  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
20851  PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 122, __pyx_L1_error)
20852  }
20853  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
20854 
20855  /* "View.MemoryView":122
20856  * cdef bint dtype_is_object
20857  *
20858  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
20859  * mode="c", bint allocate_buffer=True):
20860  *
20861  */
20862 
20863  /* function exit code */
20864  goto __pyx_L0;
20865  __pyx_L1_error:;
20866  __pyx_r = -1;
20867  __pyx_L0:;
20868  __Pyx_RefNannyFinishContext();
20869  return __pyx_r;
20870 }
20871 
20872 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
20873  int __pyx_v_idx;
20874  Py_ssize_t __pyx_v_i;
20875  Py_ssize_t __pyx_v_dim;
20876  PyObject **__pyx_v_p;
20877  char __pyx_v_order;
20878  int __pyx_r;
20879  __Pyx_RefNannyDeclarations
20880  Py_ssize_t __pyx_t_1;
20881  int __pyx_t_2;
20882  PyObject *__pyx_t_3 = NULL;
20883  int __pyx_t_4;
20884  PyObject *__pyx_t_5 = NULL;
20885  PyObject *__pyx_t_6 = NULL;
20886  char *__pyx_t_7;
20887  int __pyx_t_8;
20888  Py_ssize_t __pyx_t_9;
20889  PyObject *__pyx_t_10 = NULL;
20890  Py_ssize_t __pyx_t_11;
20891  __Pyx_RefNannySetupContext("__cinit__", 0);
20892  __Pyx_INCREF(__pyx_v_format);
20893 
20894  /* "View.MemoryView":129
20895  * cdef PyObject **p
20896  *
20897  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
20898  * self.itemsize = itemsize
20899  *
20900  */
20901  if (unlikely(__pyx_v_shape == Py_None)) {
20902  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
20903  __PYX_ERR(0, 129, __pyx_L1_error)
20904  }
20905  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 129, __pyx_L1_error)
20906  __pyx_v_self->ndim = ((int)__pyx_t_1);
20907 
20908  /* "View.MemoryView":130
20909  *
20910  * self.ndim = <int> len(shape)
20911  * self.itemsize = itemsize # <<<<<<<<<<<<<<
20912  *
20913  * if not self.ndim:
20914  */
20915  __pyx_v_self->itemsize = __pyx_v_itemsize;
20916 
20917  /* "View.MemoryView":132
20918  * self.itemsize = itemsize
20919  *
20920  * if not self.ndim: # <<<<<<<<<<<<<<
20921  * raise ValueError("Empty shape tuple for cython.array")
20922  *
20923  */
20924  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
20925  if (unlikely(__pyx_t_2)) {
20926 
20927  /* "View.MemoryView":133
20928  *
20929  * if not self.ndim:
20930  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
20931  *
20932  * if itemsize <= 0:
20933  */
20934  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
20935  __Pyx_GOTREF(__pyx_t_3);
20936  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20937  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20938  __PYX_ERR(0, 133, __pyx_L1_error)
20939 
20940  /* "View.MemoryView":132
20941  * self.itemsize = itemsize
20942  *
20943  * if not self.ndim: # <<<<<<<<<<<<<<
20944  * raise ValueError("Empty shape tuple for cython.array")
20945  *
20946  */
20947  }
20948 
20949  /* "View.MemoryView":135
20950  * raise ValueError("Empty shape tuple for cython.array")
20951  *
20952  * if itemsize <= 0: # <<<<<<<<<<<<<<
20953  * raise ValueError("itemsize <= 0 for cython.array")
20954  *
20955  */
20956  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
20957  if (unlikely(__pyx_t_2)) {
20958 
20959  /* "View.MemoryView":136
20960  *
20961  * if itemsize <= 0:
20962  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
20963  *
20964  * if not isinstance(format, bytes):
20965  */
20966  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
20967  __Pyx_GOTREF(__pyx_t_3);
20968  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20969  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20970  __PYX_ERR(0, 136, __pyx_L1_error)
20971 
20972  /* "View.MemoryView":135
20973  * raise ValueError("Empty shape tuple for cython.array")
20974  *
20975  * if itemsize <= 0: # <<<<<<<<<<<<<<
20976  * raise ValueError("itemsize <= 0 for cython.array")
20977  *
20978  */
20979  }
20980 
20981  /* "View.MemoryView":138
20982  * raise ValueError("itemsize <= 0 for cython.array")
20983  *
20984  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
20985  * format = format.encode('ASCII')
20986  * self._format = format # keep a reference to the byte string
20987  */
20988  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
20989  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
20990  if (__pyx_t_4) {
20991 
20992  /* "View.MemoryView":139
20993  *
20994  * if not isinstance(format, bytes):
20995  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
20996  * self._format = format # keep a reference to the byte string
20997  * self.format = self._format
20998  */
20999  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
21000  __Pyx_GOTREF(__pyx_t_5);
21001  __pyx_t_6 = NULL;
21002  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
21003  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
21004  if (likely(__pyx_t_6)) {
21005  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
21006  __Pyx_INCREF(__pyx_t_6);
21007  __Pyx_INCREF(function);
21008  __Pyx_DECREF_SET(__pyx_t_5, function);
21009  }
21010  }
21011  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
21012  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21013  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
21014  __Pyx_GOTREF(__pyx_t_3);
21015  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21016  __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
21017  __pyx_t_3 = 0;
21018 
21019  /* "View.MemoryView":138
21020  * raise ValueError("itemsize <= 0 for cython.array")
21021  *
21022  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
21023  * format = format.encode('ASCII')
21024  * self._format = format # keep a reference to the byte string
21025  */
21026  }
21027 
21028  /* "View.MemoryView":140
21029  * if not isinstance(format, bytes):
21030  * format = format.encode('ASCII')
21031  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
21032  * self.format = self._format
21033  *
21034  */
21035  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(0, 140, __pyx_L1_error)
21036  __pyx_t_3 = __pyx_v_format;
21037  __Pyx_INCREF(__pyx_t_3);
21038  __Pyx_GIVEREF(__pyx_t_3);
21039  __Pyx_GOTREF(__pyx_v_self->_format);
21040  __Pyx_DECREF(__pyx_v_self->_format);
21041  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
21042  __pyx_t_3 = 0;
21043 
21044  /* "View.MemoryView":141
21045  * format = format.encode('ASCII')
21046  * self._format = format # keep a reference to the byte string
21047  * self.format = self._format # <<<<<<<<<<<<<<
21048  *
21049  *
21050  */
21051  if (unlikely(__pyx_v_self->_format == Py_None)) {
21052  PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
21053  __PYX_ERR(0, 141, __pyx_L1_error)
21054  }
21055  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
21056  __pyx_v_self->format = __pyx_t_7;
21057 
21058  /* "View.MemoryView":144
21059  *
21060  *
21061  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
21062  * self._strides = self._shape + self.ndim
21063  *
21064  */
21065  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
21066 
21067  /* "View.MemoryView":145
21068  *
21069  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
21070  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
21071  *
21072  * if not self._shape:
21073  */
21074  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
21075 
21076  /* "View.MemoryView":147
21077  * self._strides = self._shape + self.ndim
21078  *
21079  * if not self._shape: # <<<<<<<<<<<<<<
21080  * raise MemoryError("unable to allocate shape and strides.")
21081  *
21082  */
21083  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
21084  if (unlikely(__pyx_t_4)) {
21085 
21086  /* "View.MemoryView":148
21087  *
21088  * if not self._shape:
21089  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
21090  *
21091  *
21092  */
21093  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
21094  __Pyx_GOTREF(__pyx_t_3);
21095  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
21096  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21097  __PYX_ERR(0, 148, __pyx_L1_error)
21098 
21099  /* "View.MemoryView":147
21100  * self._strides = self._shape + self.ndim
21101  *
21102  * if not self._shape: # <<<<<<<<<<<<<<
21103  * raise MemoryError("unable to allocate shape and strides.")
21104  *
21105  */
21106  }
21107 
21108  /* "View.MemoryView":151
21109  *
21110  *
21111  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
21112  * if dim <= 0:
21113  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21114  */
21115  __pyx_t_8 = 0;
21116  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
21117  for (;;) {
21118  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
21119  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21120  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
21121  #else
21122  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
21123  __Pyx_GOTREF(__pyx_t_5);
21124  #endif
21125  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error)
21126  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21127  __pyx_v_dim = __pyx_t_9;
21128  __pyx_v_idx = __pyx_t_8;
21129  __pyx_t_8 = (__pyx_t_8 + 1);
21130 
21131  /* "View.MemoryView":152
21132  *
21133  * for idx, dim in enumerate(shape):
21134  * if dim <= 0: # <<<<<<<<<<<<<<
21135  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21136  * self._shape[idx] = dim
21137  */
21138  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
21139  if (unlikely(__pyx_t_4)) {
21140 
21141  /* "View.MemoryView":153
21142  * for idx, dim in enumerate(shape):
21143  * if dim <= 0:
21144  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
21145  * self._shape[idx] = dim
21146  *
21147  */
21148  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
21149  __Pyx_GOTREF(__pyx_t_5);
21150  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
21151  __Pyx_GOTREF(__pyx_t_6);
21152  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
21153  __Pyx_GOTREF(__pyx_t_10);
21154  __Pyx_GIVEREF(__pyx_t_5);
21155  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
21156  __Pyx_GIVEREF(__pyx_t_6);
21157  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
21158  __pyx_t_5 = 0;
21159  __pyx_t_6 = 0;
21160  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
21161  __Pyx_GOTREF(__pyx_t_6);
21162  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21163  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
21164  __Pyx_GOTREF(__pyx_t_10);
21165  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21166  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
21167  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21168  __PYX_ERR(0, 153, __pyx_L1_error)
21169 
21170  /* "View.MemoryView":152
21171  *
21172  * for idx, dim in enumerate(shape):
21173  * if dim <= 0: # <<<<<<<<<<<<<<
21174  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21175  * self._shape[idx] = dim
21176  */
21177  }
21178 
21179  /* "View.MemoryView":154
21180  * if dim <= 0:
21181  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21182  * self._shape[idx] = dim # <<<<<<<<<<<<<<
21183  *
21184  * cdef char order
21185  */
21186  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
21187 
21188  /* "View.MemoryView":151
21189  *
21190  *
21191  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
21192  * if dim <= 0:
21193  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21194  */
21195  }
21196  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21197 
21198  /* "View.MemoryView":157
21199  *
21200  * cdef char order
21201  * if mode == 'fortran': # <<<<<<<<<<<<<<
21202  * order = b'F'
21203  * self.mode = u'fortran'
21204  */
21205  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 157, __pyx_L1_error)
21206  if (__pyx_t_4) {
21207 
21208  /* "View.MemoryView":158
21209  * cdef char order
21210  * if mode == 'fortran':
21211  * order = b'F' # <<<<<<<<<<<<<<
21212  * self.mode = u'fortran'
21213  * elif mode == 'c':
21214  */
21215  __pyx_v_order = 'F';
21216 
21217  /* "View.MemoryView":159
21218  * if mode == 'fortran':
21219  * order = b'F'
21220  * self.mode = u'fortran' # <<<<<<<<<<<<<<
21221  * elif mode == 'c':
21222  * order = b'C'
21223  */
21224  __Pyx_INCREF(__pyx_n_u_fortran);
21225  __Pyx_GIVEREF(__pyx_n_u_fortran);
21226  __Pyx_GOTREF(__pyx_v_self->mode);
21227  __Pyx_DECREF(__pyx_v_self->mode);
21228  __pyx_v_self->mode = __pyx_n_u_fortran;
21229 
21230  /* "View.MemoryView":157
21231  *
21232  * cdef char order
21233  * if mode == 'fortran': # <<<<<<<<<<<<<<
21234  * order = b'F'
21235  * self.mode = u'fortran'
21236  */
21237  goto __pyx_L10;
21238  }
21239 
21240  /* "View.MemoryView":160
21241  * order = b'F'
21242  * self.mode = u'fortran'
21243  * elif mode == 'c': # <<<<<<<<<<<<<<
21244  * order = b'C'
21245  * self.mode = u'c'
21246  */
21247  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
21248  if (likely(__pyx_t_4)) {
21249 
21250  /* "View.MemoryView":161
21251  * self.mode = u'fortran'
21252  * elif mode == 'c':
21253  * order = b'C' # <<<<<<<<<<<<<<
21254  * self.mode = u'c'
21255  * else:
21256  */
21257  __pyx_v_order = 'C';
21258 
21259  /* "View.MemoryView":162
21260  * elif mode == 'c':
21261  * order = b'C'
21262  * self.mode = u'c' # <<<<<<<<<<<<<<
21263  * else:
21264  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
21265  */
21266  __Pyx_INCREF(__pyx_n_u_c);
21267  __Pyx_GIVEREF(__pyx_n_u_c);
21268  __Pyx_GOTREF(__pyx_v_self->mode);
21269  __Pyx_DECREF(__pyx_v_self->mode);
21270  __pyx_v_self->mode = __pyx_n_u_c;
21271 
21272  /* "View.MemoryView":160
21273  * order = b'F'
21274  * self.mode = u'fortran'
21275  * elif mode == 'c': # <<<<<<<<<<<<<<
21276  * order = b'C'
21277  * self.mode = u'c'
21278  */
21279  goto __pyx_L10;
21280  }
21281 
21282  /* "View.MemoryView":164
21283  * self.mode = u'c'
21284  * else:
21285  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
21286  *
21287  * self.len = fill_contig_strides_array(self._shape, self._strides,
21288  */
21289  /*else*/ {
21290  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
21291  __Pyx_GOTREF(__pyx_t_3);
21292  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 164, __pyx_L1_error)
21293  __Pyx_GOTREF(__pyx_t_10);
21294  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21295  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
21296  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21297  __PYX_ERR(0, 164, __pyx_L1_error)
21298  }
21299  __pyx_L10:;
21300 
21301  /* "View.MemoryView":166
21302  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
21303  *
21304  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
21305  * itemsize, self.ndim, order)
21306  *
21307  */
21308  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
21309 
21310  /* "View.MemoryView":169
21311  * itemsize, self.ndim, order)
21312  *
21313  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
21314  * self.dtype_is_object = format == b'O'
21315  * if allocate_buffer:
21316  */
21317  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
21318 
21319  /* "View.MemoryView":170
21320  *
21321  * self.free_data = allocate_buffer
21322  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
21323  * if allocate_buffer:
21324  *
21325  */
21326  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 170, __pyx_L1_error)
21327  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error)
21328  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21329  __pyx_v_self->dtype_is_object = __pyx_t_4;
21330 
21331  /* "View.MemoryView":171
21332  * self.free_data = allocate_buffer
21333  * self.dtype_is_object = format == b'O'
21334  * if allocate_buffer: # <<<<<<<<<<<<<<
21335  *
21336  *
21337  */
21338  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
21339  if (__pyx_t_4) {
21340 
21341  /* "View.MemoryView":174
21342  *
21343  *
21344  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
21345  * if not self.data:
21346  * raise MemoryError("unable to allocate array data.")
21347  */
21348  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
21349 
21350  /* "View.MemoryView":175
21351  *
21352  * self.data = <char *>malloc(self.len)
21353  * if not self.data: # <<<<<<<<<<<<<<
21354  * raise MemoryError("unable to allocate array data.")
21355  *
21356  */
21357  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
21358  if (unlikely(__pyx_t_4)) {
21359 
21360  /* "View.MemoryView":176
21361  * self.data = <char *>malloc(self.len)
21362  * if not self.data:
21363  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
21364  *
21365  * if self.dtype_is_object:
21366  */
21367  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L1_error)
21368  __Pyx_GOTREF(__pyx_t_10);
21369  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
21370  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21371  __PYX_ERR(0, 176, __pyx_L1_error)
21372 
21373  /* "View.MemoryView":175
21374  *
21375  * self.data = <char *>malloc(self.len)
21376  * if not self.data: # <<<<<<<<<<<<<<
21377  * raise MemoryError("unable to allocate array data.")
21378  *
21379  */
21380  }
21381 
21382  /* "View.MemoryView":178
21383  * raise MemoryError("unable to allocate array data.")
21384  *
21385  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21386  * p = <PyObject **> self.data
21387  * for i in range(self.len / itemsize):
21388  */
21389  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
21390  if (__pyx_t_4) {
21391 
21392  /* "View.MemoryView":179
21393  *
21394  * if self.dtype_is_object:
21395  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
21396  * for i in range(self.len / itemsize):
21397  * p[i] = Py_None
21398  */
21399  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
21400 
21401  /* "View.MemoryView":180
21402  * if self.dtype_is_object:
21403  * p = <PyObject **> self.data
21404  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
21405  * p[i] = Py_None
21406  * Py_INCREF(Py_None)
21407  */
21408  if (unlikely(__pyx_v_itemsize == 0)) {
21409  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
21410  __PYX_ERR(0, 180, __pyx_L1_error)
21411  }
21412  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
21413  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
21414  __PYX_ERR(0, 180, __pyx_L1_error)
21415  }
21416  __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
21417  __pyx_t_9 = __pyx_t_1;
21418  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
21419  __pyx_v_i = __pyx_t_11;
21420 
21421  /* "View.MemoryView":181
21422  * p = <PyObject **> self.data
21423  * for i in range(self.len / itemsize):
21424  * p[i] = Py_None # <<<<<<<<<<<<<<
21425  * Py_INCREF(Py_None)
21426  *
21427  */
21428  (__pyx_v_p[__pyx_v_i]) = Py_None;
21429 
21430  /* "View.MemoryView":182
21431  * for i in range(self.len / itemsize):
21432  * p[i] = Py_None
21433  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
21434  *
21435  * @cname('getbuffer')
21436  */
21437  Py_INCREF(Py_None);
21438  }
21439 
21440  /* "View.MemoryView":178
21441  * raise MemoryError("unable to allocate array data.")
21442  *
21443  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21444  * p = <PyObject **> self.data
21445  * for i in range(self.len / itemsize):
21446  */
21447  }
21448 
21449  /* "View.MemoryView":171
21450  * self.free_data = allocate_buffer
21451  * self.dtype_is_object = format == b'O'
21452  * if allocate_buffer: # <<<<<<<<<<<<<<
21453  *
21454  *
21455  */
21456  }
21457 
21458  /* "View.MemoryView":122
21459  * cdef bint dtype_is_object
21460  *
21461  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
21462  * mode="c", bint allocate_buffer=True):
21463  *
21464  */
21465 
21466  /* function exit code */
21467  __pyx_r = 0;
21468  goto __pyx_L0;
21469  __pyx_L1_error:;
21470  __Pyx_XDECREF(__pyx_t_3);
21471  __Pyx_XDECREF(__pyx_t_5);
21472  __Pyx_XDECREF(__pyx_t_6);
21473  __Pyx_XDECREF(__pyx_t_10);
21474  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21475  __pyx_r = -1;
21476  __pyx_L0:;
21477  __Pyx_XDECREF(__pyx_v_format);
21478  __Pyx_RefNannyFinishContext();
21479  return __pyx_r;
21480 }
21481 
21482 /* "View.MemoryView":185
21483  *
21484  * @cname('getbuffer')
21485  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
21486  * cdef int bufmode = -1
21487  * if self.mode == u"c":
21488  */
21489 
21490 /* Python wrapper */
21491 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
21492 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
21493  int __pyx_r;
21494  __Pyx_RefNannyDeclarations
21495  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
21496  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
21497 
21498  /* function exit code */
21499  __Pyx_RefNannyFinishContext();
21500  return __pyx_r;
21501 }
21502 
21503 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
21504  int __pyx_v_bufmode;
21505  int __pyx_r;
21506  __Pyx_RefNannyDeclarations
21507  int __pyx_t_1;
21508  int __pyx_t_2;
21509  PyObject *__pyx_t_3 = NULL;
21510  char *__pyx_t_4;
21511  Py_ssize_t __pyx_t_5;
21512  int __pyx_t_6;
21513  Py_ssize_t *__pyx_t_7;
21514  if (__pyx_v_info == NULL) {
21515  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
21516  return -1;
21517  }
21518  __Pyx_RefNannySetupContext("__getbuffer__", 0);
21519  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
21520  __Pyx_GIVEREF(__pyx_v_info->obj);
21521 
21522  /* "View.MemoryView":186
21523  * @cname('getbuffer')
21524  * def __getbuffer__(self, Py_buffer *info, int flags):
21525  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
21526  * if self.mode == u"c":
21527  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21528  */
21529  __pyx_v_bufmode = -1;
21530 
21531  /* "View.MemoryView":187
21532  * def __getbuffer__(self, Py_buffer *info, int flags):
21533  * cdef int bufmode = -1
21534  * if self.mode == u"c": # <<<<<<<<<<<<<<
21535  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21536  * elif self.mode == u"fortran":
21537  */
21538  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 187, __pyx_L1_error)
21539  __pyx_t_2 = (__pyx_t_1 != 0);
21540  if (__pyx_t_2) {
21541 
21542  /* "View.MemoryView":188
21543  * cdef int bufmode = -1
21544  * if self.mode == u"c":
21545  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
21546  * elif self.mode == u"fortran":
21547  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21548  */
21549  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
21550 
21551  /* "View.MemoryView":187
21552  * def __getbuffer__(self, Py_buffer *info, int flags):
21553  * cdef int bufmode = -1
21554  * if self.mode == u"c": # <<<<<<<<<<<<<<
21555  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21556  * elif self.mode == u"fortran":
21557  */
21558  goto __pyx_L3;
21559  }
21560 
21561  /* "View.MemoryView":189
21562  * if self.mode == u"c":
21563  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21564  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
21565  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21566  * if not (flags & bufmode):
21567  */
21568  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)
21569  __pyx_t_1 = (__pyx_t_2 != 0);
21570  if (__pyx_t_1) {
21571 
21572  /* "View.MemoryView":190
21573  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21574  * elif self.mode == u"fortran":
21575  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
21576  * if not (flags & bufmode):
21577  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21578  */
21579  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
21580 
21581  /* "View.MemoryView":189
21582  * if self.mode == u"c":
21583  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21584  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
21585  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21586  * if not (flags & bufmode):
21587  */
21588  }
21589  __pyx_L3:;
21590 
21591  /* "View.MemoryView":191
21592  * elif self.mode == u"fortran":
21593  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21594  * if not (flags & bufmode): # <<<<<<<<<<<<<<
21595  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21596  * info.buf = self.data
21597  */
21598  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
21599  if (unlikely(__pyx_t_1)) {
21600 
21601  /* "View.MemoryView":192
21602  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21603  * if not (flags & bufmode):
21604  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
21605  * info.buf = self.data
21606  * info.len = self.len
21607  */
21608  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
21609  __Pyx_GOTREF(__pyx_t_3);
21610  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
21611  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21612  __PYX_ERR(0, 192, __pyx_L1_error)
21613 
21614  /* "View.MemoryView":191
21615  * elif self.mode == u"fortran":
21616  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21617  * if not (flags & bufmode): # <<<<<<<<<<<<<<
21618  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21619  * info.buf = self.data
21620  */
21621  }
21622 
21623  /* "View.MemoryView":193
21624  * if not (flags & bufmode):
21625  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21626  * info.buf = self.data # <<<<<<<<<<<<<<
21627  * info.len = self.len
21628  * info.ndim = self.ndim
21629  */
21630  __pyx_t_4 = __pyx_v_self->data;
21631  __pyx_v_info->buf = __pyx_t_4;
21632 
21633  /* "View.MemoryView":194
21634  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21635  * info.buf = self.data
21636  * info.len = self.len # <<<<<<<<<<<<<<
21637  * info.ndim = self.ndim
21638  * info.shape = self._shape
21639  */
21640  __pyx_t_5 = __pyx_v_self->len;
21641  __pyx_v_info->len = __pyx_t_5;
21642 
21643  /* "View.MemoryView":195
21644  * info.buf = self.data
21645  * info.len = self.len
21646  * info.ndim = self.ndim # <<<<<<<<<<<<<<
21647  * info.shape = self._shape
21648  * info.strides = self._strides
21649  */
21650  __pyx_t_6 = __pyx_v_self->ndim;
21651  __pyx_v_info->ndim = __pyx_t_6;
21652 
21653  /* "View.MemoryView":196
21654  * info.len = self.len
21655  * info.ndim = self.ndim
21656  * info.shape = self._shape # <<<<<<<<<<<<<<
21657  * info.strides = self._strides
21658  * info.suboffsets = NULL
21659  */
21660  __pyx_t_7 = __pyx_v_self->_shape;
21661  __pyx_v_info->shape = __pyx_t_7;
21662 
21663  /* "View.MemoryView":197
21664  * info.ndim = self.ndim
21665  * info.shape = self._shape
21666  * info.strides = self._strides # <<<<<<<<<<<<<<
21667  * info.suboffsets = NULL
21668  * info.itemsize = self.itemsize
21669  */
21670  __pyx_t_7 = __pyx_v_self->_strides;
21671  __pyx_v_info->strides = __pyx_t_7;
21672 
21673  /* "View.MemoryView":198
21674  * info.shape = self._shape
21675  * info.strides = self._strides
21676  * info.suboffsets = NULL # <<<<<<<<<<<<<<
21677  * info.itemsize = self.itemsize
21678  * info.readonly = 0
21679  */
21680  __pyx_v_info->suboffsets = NULL;
21681 
21682  /* "View.MemoryView":199
21683  * info.strides = self._strides
21684  * info.suboffsets = NULL
21685  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
21686  * info.readonly = 0
21687  *
21688  */
21689  __pyx_t_5 = __pyx_v_self->itemsize;
21690  __pyx_v_info->itemsize = __pyx_t_5;
21691 
21692  /* "View.MemoryView":200
21693  * info.suboffsets = NULL
21694  * info.itemsize = self.itemsize
21695  * info.readonly = 0 # <<<<<<<<<<<<<<
21696  *
21697  * if flags & PyBUF_FORMAT:
21698  */
21699  __pyx_v_info->readonly = 0;
21700 
21701  /* "View.MemoryView":202
21702  * info.readonly = 0
21703  *
21704  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
21705  * info.format = self.format
21706  * else:
21707  */
21708  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
21709  if (__pyx_t_1) {
21710 
21711  /* "View.MemoryView":203
21712  *
21713  * if flags & PyBUF_FORMAT:
21714  * info.format = self.format # <<<<<<<<<<<<<<
21715  * else:
21716  * info.format = NULL
21717  */
21718  __pyx_t_4 = __pyx_v_self->format;
21719  __pyx_v_info->format = __pyx_t_4;
21720 
21721  /* "View.MemoryView":202
21722  * info.readonly = 0
21723  *
21724  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
21725  * info.format = self.format
21726  * else:
21727  */
21728  goto __pyx_L5;
21729  }
21730 
21731  /* "View.MemoryView":205
21732  * info.format = self.format
21733  * else:
21734  * info.format = NULL # <<<<<<<<<<<<<<
21735  *
21736  * info.obj = self
21737  */
21738  /*else*/ {
21739  __pyx_v_info->format = NULL;
21740  }
21741  __pyx_L5:;
21742 
21743  /* "View.MemoryView":207
21744  * info.format = NULL
21745  *
21746  * info.obj = self # <<<<<<<<<<<<<<
21747  *
21748  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21749  */
21750  __Pyx_INCREF(((PyObject *)__pyx_v_self));
21751  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
21752  __Pyx_GOTREF(__pyx_v_info->obj);
21753  __Pyx_DECREF(__pyx_v_info->obj);
21754  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
21755 
21756  /* "View.MemoryView":185
21757  *
21758  * @cname('getbuffer')
21759  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
21760  * cdef int bufmode = -1
21761  * if self.mode == u"c":
21762  */
21763 
21764  /* function exit code */
21765  __pyx_r = 0;
21766  goto __pyx_L0;
21767  __pyx_L1_error:;
21768  __Pyx_XDECREF(__pyx_t_3);
21769  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21770  __pyx_r = -1;
21771  if (__pyx_v_info->obj != NULL) {
21772  __Pyx_GOTREF(__pyx_v_info->obj);
21773  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
21774  }
21775  goto __pyx_L2;
21776  __pyx_L0:;
21777  if (__pyx_v_info->obj == Py_None) {
21778  __Pyx_GOTREF(__pyx_v_info->obj);
21779  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
21780  }
21781  __pyx_L2:;
21782  __Pyx_RefNannyFinishContext();
21783  return __pyx_r;
21784 }
21785 
21786 /* "View.MemoryView":211
21787  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21788  *
21789  * def __dealloc__(array self): # <<<<<<<<<<<<<<
21790  * if self.callback_free_data != NULL:
21791  * self.callback_free_data(self.data)
21792  */
21793 
21794 /* Python wrapper */
21795 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
21796 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
21797  __Pyx_RefNannyDeclarations
21798  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
21799  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
21800 
21801  /* function exit code */
21802  __Pyx_RefNannyFinishContext();
21803 }
21804 
21805 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
21806  __Pyx_RefNannyDeclarations
21807  int __pyx_t_1;
21808  __Pyx_RefNannySetupContext("__dealloc__", 0);
21809 
21810  /* "View.MemoryView":212
21811  *
21812  * def __dealloc__(array self):
21813  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
21814  * self.callback_free_data(self.data)
21815  * elif self.free_data:
21816  */
21817  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
21818  if (__pyx_t_1) {
21819 
21820  /* "View.MemoryView":213
21821  * def __dealloc__(array self):
21822  * if self.callback_free_data != NULL:
21823  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
21824  * elif self.free_data:
21825  * if self.dtype_is_object:
21826  */
21827  __pyx_v_self->callback_free_data(__pyx_v_self->data);
21828 
21829  /* "View.MemoryView":212
21830  *
21831  * def __dealloc__(array self):
21832  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
21833  * self.callback_free_data(self.data)
21834  * elif self.free_data:
21835  */
21836  goto __pyx_L3;
21837  }
21838 
21839  /* "View.MemoryView":214
21840  * if self.callback_free_data != NULL:
21841  * self.callback_free_data(self.data)
21842  * elif self.free_data: # <<<<<<<<<<<<<<
21843  * if self.dtype_is_object:
21844  * refcount_objects_in_slice(self.data, self._shape,
21845  */
21846  __pyx_t_1 = (__pyx_v_self->free_data != 0);
21847  if (__pyx_t_1) {
21848 
21849  /* "View.MemoryView":215
21850  * self.callback_free_data(self.data)
21851  * elif self.free_data:
21852  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21853  * refcount_objects_in_slice(self.data, self._shape,
21854  * self._strides, self.ndim, False)
21855  */
21856  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
21857  if (__pyx_t_1) {
21858 
21859  /* "View.MemoryView":216
21860  * elif self.free_data:
21861  * if self.dtype_is_object:
21862  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
21863  * self._strides, self.ndim, False)
21864  * free(self.data)
21865  */
21866  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
21867 
21868  /* "View.MemoryView":215
21869  * self.callback_free_data(self.data)
21870  * elif self.free_data:
21871  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21872  * refcount_objects_in_slice(self.data, self._shape,
21873  * self._strides, self.ndim, False)
21874  */
21875  }
21876 
21877  /* "View.MemoryView":218
21878  * refcount_objects_in_slice(self.data, self._shape,
21879  * self._strides, self.ndim, False)
21880  * free(self.data) # <<<<<<<<<<<<<<
21881  * PyObject_Free(self._shape)
21882  *
21883  */
21884  free(__pyx_v_self->data);
21885 
21886  /* "View.MemoryView":214
21887  * if self.callback_free_data != NULL:
21888  * self.callback_free_data(self.data)
21889  * elif self.free_data: # <<<<<<<<<<<<<<
21890  * if self.dtype_is_object:
21891  * refcount_objects_in_slice(self.data, self._shape,
21892  */
21893  }
21894  __pyx_L3:;
21895 
21896  /* "View.MemoryView":219
21897  * self._strides, self.ndim, False)
21898  * free(self.data)
21899  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
21900  *
21901  * @property
21902  */
21903  PyObject_Free(__pyx_v_self->_shape);
21904 
21905  /* "View.MemoryView":211
21906  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21907  *
21908  * def __dealloc__(array self): # <<<<<<<<<<<<<<
21909  * if self.callback_free_data != NULL:
21910  * self.callback_free_data(self.data)
21911  */
21912 
21913  /* function exit code */
21914  __Pyx_RefNannyFinishContext();
21915 }
21916 
21917 /* "View.MemoryView":222
21918  *
21919  * @property
21920  * def memview(self): # <<<<<<<<<<<<<<
21921  * return self.get_memview()
21922  *
21923  */
21924 
21925 /* Python wrapper */
21926 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
21927 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
21928  PyObject *__pyx_r = 0;
21929  __Pyx_RefNannyDeclarations
21930  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
21931  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
21932 
21933  /* function exit code */
21934  __Pyx_RefNannyFinishContext();
21935  return __pyx_r;
21936 }
21937 
21938 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
21939  PyObject *__pyx_r = NULL;
21940  __Pyx_RefNannyDeclarations
21941  PyObject *__pyx_t_1 = NULL;
21942  __Pyx_RefNannySetupContext("__get__", 0);
21943 
21944  /* "View.MemoryView":223
21945  * @property
21946  * def memview(self):
21947  * return self.get_memview() # <<<<<<<<<<<<<<
21948  *
21949  * @cname('get_memview')
21950  */
21951  __Pyx_XDECREF(__pyx_r);
21952  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
21953  __Pyx_GOTREF(__pyx_t_1);
21954  __pyx_r = __pyx_t_1;
21955  __pyx_t_1 = 0;
21956  goto __pyx_L0;
21957 
21958  /* "View.MemoryView":222
21959  *
21960  * @property
21961  * def memview(self): # <<<<<<<<<<<<<<
21962  * return self.get_memview()
21963  *
21964  */
21965 
21966  /* function exit code */
21967  __pyx_L1_error:;
21968  __Pyx_XDECREF(__pyx_t_1);
21969  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21970  __pyx_r = NULL;
21971  __pyx_L0:;
21972  __Pyx_XGIVEREF(__pyx_r);
21973  __Pyx_RefNannyFinishContext();
21974  return __pyx_r;
21975 }
21976 
21977 /* "View.MemoryView":226
21978  *
21979  * @cname('get_memview')
21980  * cdef get_memview(self): # <<<<<<<<<<<<<<
21981  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
21982  * return memoryview(self, flags, self.dtype_is_object)
21983  */
21984 
21985 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
21986  int __pyx_v_flags;
21987  PyObject *__pyx_r = NULL;
21988  __Pyx_RefNannyDeclarations
21989  PyObject *__pyx_t_1 = NULL;
21990  PyObject *__pyx_t_2 = NULL;
21991  PyObject *__pyx_t_3 = NULL;
21992  __Pyx_RefNannySetupContext("get_memview", 0);
21993 
21994  /* "View.MemoryView":227
21995  * @cname('get_memview')
21996  * cdef get_memview(self):
21997  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
21998  * return memoryview(self, flags, self.dtype_is_object)
21999  *
22000  */
22001  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
22002 
22003  /* "View.MemoryView":228
22004  * cdef get_memview(self):
22005  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
22006  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
22007  *
22008  * def __len__(self):
22009  */
22010  __Pyx_XDECREF(__pyx_r);
22011  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
22012  __Pyx_GOTREF(__pyx_t_1);
22013  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
22014  __Pyx_GOTREF(__pyx_t_2);
22015  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
22016  __Pyx_GOTREF(__pyx_t_3);
22017  __Pyx_INCREF(((PyObject *)__pyx_v_self));
22018  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
22019  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
22020  __Pyx_GIVEREF(__pyx_t_1);
22021  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
22022  __Pyx_GIVEREF(__pyx_t_2);
22023  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
22024  __pyx_t_1 = 0;
22025  __pyx_t_2 = 0;
22026  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
22027  __Pyx_GOTREF(__pyx_t_2);
22028  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22029  __pyx_r = __pyx_t_2;
22030  __pyx_t_2 = 0;
22031  goto __pyx_L0;
22032 
22033  /* "View.MemoryView":226
22034  *
22035  * @cname('get_memview')
22036  * cdef get_memview(self): # <<<<<<<<<<<<<<
22037  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
22038  * return memoryview(self, flags, self.dtype_is_object)
22039  */
22040 
22041  /* function exit code */
22042  __pyx_L1_error:;
22043  __Pyx_XDECREF(__pyx_t_1);
22044  __Pyx_XDECREF(__pyx_t_2);
22045  __Pyx_XDECREF(__pyx_t_3);
22046  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
22047  __pyx_r = 0;
22048  __pyx_L0:;
22049  __Pyx_XGIVEREF(__pyx_r);
22050  __Pyx_RefNannyFinishContext();
22051  return __pyx_r;
22052 }
22053 
22054 /* "View.MemoryView":230
22055  * return memoryview(self, flags, self.dtype_is_object)
22056  *
22057  * def __len__(self): # <<<<<<<<<<<<<<
22058  * return self._shape[0]
22059  *
22060  */
22061 
22062 /* Python wrapper */
22063 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
22064 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
22065  Py_ssize_t __pyx_r;
22066  __Pyx_RefNannyDeclarations
22067  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
22068  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
22069 
22070  /* function exit code */
22071  __Pyx_RefNannyFinishContext();
22072  return __pyx_r;
22073 }
22074 
22075 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
22076  Py_ssize_t __pyx_r;
22077  __Pyx_RefNannyDeclarations
22078  __Pyx_RefNannySetupContext("__len__", 0);
22079 
22080  /* "View.MemoryView":231
22081  *
22082  * def __len__(self):
22083  * return self._shape[0] # <<<<<<<<<<<<<<
22084  *
22085  * def __getattr__(self, attr):
22086  */
22087  __pyx_r = (__pyx_v_self->_shape[0]);
22088  goto __pyx_L0;
22089 
22090  /* "View.MemoryView":230
22091  * return memoryview(self, flags, self.dtype_is_object)
22092  *
22093  * def __len__(self): # <<<<<<<<<<<<<<
22094  * return self._shape[0]
22095  *
22096  */
22097 
22098  /* function exit code */
22099  __pyx_L0:;
22100  __Pyx_RefNannyFinishContext();
22101  return __pyx_r;
22102 }
22103 
22104 /* "View.MemoryView":233
22105  * return self._shape[0]
22106  *
22107  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
22108  * return getattr(self.memview, attr)
22109  *
22110  */
22111 
22112 /* Python wrapper */
22113 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
22114 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
22115  PyObject *__pyx_r = 0;
22116  __Pyx_RefNannyDeclarations
22117  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
22118  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
22119 
22120  /* function exit code */
22121  __Pyx_RefNannyFinishContext();
22122  return __pyx_r;
22123 }
22124 
22125 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
22126  PyObject *__pyx_r = NULL;
22127  __Pyx_RefNannyDeclarations
22128  PyObject *__pyx_t_1 = NULL;
22129  PyObject *__pyx_t_2 = NULL;
22130  __Pyx_RefNannySetupContext("__getattr__", 0);
22131 
22132  /* "View.MemoryView":234
22133  *
22134  * def __getattr__(self, attr):
22135  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
22136  *
22137  * def __getitem__(self, item):
22138  */
22139  __Pyx_XDECREF(__pyx_r);
22140  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
22141  __Pyx_GOTREF(__pyx_t_1);
22142  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
22143  __Pyx_GOTREF(__pyx_t_2);
22144  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22145  __pyx_r = __pyx_t_2;
22146  __pyx_t_2 = 0;
22147  goto __pyx_L0;
22148 
22149  /* "View.MemoryView":233
22150  * return self._shape[0]
22151  *
22152  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
22153  * return getattr(self.memview, attr)
22154  *
22155  */
22156 
22157  /* function exit code */
22158  __pyx_L1_error:;
22159  __Pyx_XDECREF(__pyx_t_1);
22160  __Pyx_XDECREF(__pyx_t_2);
22161  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22162  __pyx_r = NULL;
22163  __pyx_L0:;
22164  __Pyx_XGIVEREF(__pyx_r);
22165  __Pyx_RefNannyFinishContext();
22166  return __pyx_r;
22167 }
22168 
22169 /* "View.MemoryView":236
22170  * return getattr(self.memview, attr)
22171  *
22172  * def __getitem__(self, item): # <<<<<<<<<<<<<<
22173  * return self.memview[item]
22174  *
22175  */
22176 
22177 /* Python wrapper */
22178 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
22179 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
22180  PyObject *__pyx_r = 0;
22181  __Pyx_RefNannyDeclarations
22182  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
22183  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
22184 
22185  /* function exit code */
22186  __Pyx_RefNannyFinishContext();
22187  return __pyx_r;
22188 }
22189 
22190 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
22191  PyObject *__pyx_r = NULL;
22192  __Pyx_RefNannyDeclarations
22193  PyObject *__pyx_t_1 = NULL;
22194  PyObject *__pyx_t_2 = NULL;
22195  __Pyx_RefNannySetupContext("__getitem__", 0);
22196 
22197  /* "View.MemoryView":237
22198  *
22199  * def __getitem__(self, item):
22200  * return self.memview[item] # <<<<<<<<<<<<<<
22201  *
22202  * def __setitem__(self, item, value):
22203  */
22204  __Pyx_XDECREF(__pyx_r);
22205  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
22206  __Pyx_GOTREF(__pyx_t_1);
22207  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
22208  __Pyx_GOTREF(__pyx_t_2);
22209  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22210  __pyx_r = __pyx_t_2;
22211  __pyx_t_2 = 0;
22212  goto __pyx_L0;
22213 
22214  /* "View.MemoryView":236
22215  * return getattr(self.memview, attr)
22216  *
22217  * def __getitem__(self, item): # <<<<<<<<<<<<<<
22218  * return self.memview[item]
22219  *
22220  */
22221 
22222  /* function exit code */
22223  __pyx_L1_error:;
22224  __Pyx_XDECREF(__pyx_t_1);
22225  __Pyx_XDECREF(__pyx_t_2);
22226  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22227  __pyx_r = NULL;
22228  __pyx_L0:;
22229  __Pyx_XGIVEREF(__pyx_r);
22230  __Pyx_RefNannyFinishContext();
22231  return __pyx_r;
22232 }
22233 
22234 /* "View.MemoryView":239
22235  * return self.memview[item]
22236  *
22237  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
22238  * self.memview[item] = value
22239  *
22240  */
22241 
22242 /* Python wrapper */
22243 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
22244 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
22245  int __pyx_r;
22246  __Pyx_RefNannyDeclarations
22247  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
22248  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
22249 
22250  /* function exit code */
22251  __Pyx_RefNannyFinishContext();
22252  return __pyx_r;
22253 }
22254 
22255 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
22256  int __pyx_r;
22257  __Pyx_RefNannyDeclarations
22258  PyObject *__pyx_t_1 = NULL;
22259  __Pyx_RefNannySetupContext("__setitem__", 0);
22260 
22261  /* "View.MemoryView":240
22262  *
22263  * def __setitem__(self, item, value):
22264  * self.memview[item] = value # <<<<<<<<<<<<<<
22265  *
22266  *
22267  */
22268  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
22269  __Pyx_GOTREF(__pyx_t_1);
22270  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
22271  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22272 
22273  /* "View.MemoryView":239
22274  * return self.memview[item]
22275  *
22276  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
22277  * self.memview[item] = value
22278  *
22279  */
22280 
22281  /* function exit code */
22282  __pyx_r = 0;
22283  goto __pyx_L0;
22284  __pyx_L1_error:;
22285  __Pyx_XDECREF(__pyx_t_1);
22286  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22287  __pyx_r = -1;
22288  __pyx_L0:;
22289  __Pyx_RefNannyFinishContext();
22290  return __pyx_r;
22291 }
22292 
22293 /* "(tree fragment)":1
22294  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22295  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22296  * def __setstate_cython__(self, __pyx_state):
22297  */
22298 
22299 /* Python wrapper */
22300 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
22301 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
22302  PyObject *__pyx_r = 0;
22303  __Pyx_RefNannyDeclarations
22304  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
22305  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
22306 
22307  /* function exit code */
22308  __Pyx_RefNannyFinishContext();
22309  return __pyx_r;
22310 }
22311 
22312 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
22313  PyObject *__pyx_r = NULL;
22314  __Pyx_RefNannyDeclarations
22315  PyObject *__pyx_t_1 = NULL;
22316  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
22317 
22318  /* "(tree fragment)":2
22319  * def __reduce_cython__(self):
22320  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
22321  * def __setstate_cython__(self, __pyx_state):
22322  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22323  */
22324  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
22325  __Pyx_GOTREF(__pyx_t_1);
22326  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
22327  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22328  __PYX_ERR(0, 2, __pyx_L1_error)
22329 
22330  /* "(tree fragment)":1
22331  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22332  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22333  * def __setstate_cython__(self, __pyx_state):
22334  */
22335 
22336  /* function exit code */
22337  __pyx_L1_error:;
22338  __Pyx_XDECREF(__pyx_t_1);
22339  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22340  __pyx_r = NULL;
22341  __Pyx_XGIVEREF(__pyx_r);
22342  __Pyx_RefNannyFinishContext();
22343  return __pyx_r;
22344 }
22345 
22346 /* "(tree fragment)":3
22347  * def __reduce_cython__(self):
22348  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22349  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22350  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22351  */
22352 
22353 /* Python wrapper */
22354 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
22355 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22356  PyObject *__pyx_r = 0;
22357  __Pyx_RefNannyDeclarations
22358  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
22359  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
22360 
22361  /* function exit code */
22362  __Pyx_RefNannyFinishContext();
22363  return __pyx_r;
22364 }
22365 
22366 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
22367  PyObject *__pyx_r = NULL;
22368  __Pyx_RefNannyDeclarations
22369  PyObject *__pyx_t_1 = NULL;
22370  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
22371 
22372  /* "(tree fragment)":4
22373  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22374  * def __setstate_cython__(self, __pyx_state):
22375  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
22376  */
22377  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
22378  __Pyx_GOTREF(__pyx_t_1);
22379  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
22380  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22381  __PYX_ERR(0, 4, __pyx_L1_error)
22382 
22383  /* "(tree fragment)":3
22384  * def __reduce_cython__(self):
22385  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22386  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22387  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22388  */
22389 
22390  /* function exit code */
22391  __pyx_L1_error:;
22392  __Pyx_XDECREF(__pyx_t_1);
22393  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22394  __pyx_r = NULL;
22395  __Pyx_XGIVEREF(__pyx_r);
22396  __Pyx_RefNannyFinishContext();
22397  return __pyx_r;
22398 }
22399 
22400 /* "View.MemoryView":244
22401  *
22402  * @cname("__pyx_array_new")
22403  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
22404  * char *mode, char *buf):
22405  * cdef array result
22406  */
22407 
22408 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
22409  struct __pyx_array_obj *__pyx_v_result = 0;
22410  struct __pyx_array_obj *__pyx_r = NULL;
22411  __Pyx_RefNannyDeclarations
22412  int __pyx_t_1;
22413  PyObject *__pyx_t_2 = NULL;
22414  PyObject *__pyx_t_3 = NULL;
22415  PyObject *__pyx_t_4 = NULL;
22416  PyObject *__pyx_t_5 = NULL;
22417  __Pyx_RefNannySetupContext("array_cwrapper", 0);
22418 
22419  /* "View.MemoryView":248
22420  * cdef array result
22421  *
22422  * if buf == NULL: # <<<<<<<<<<<<<<
22423  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22424  * else:
22425  */
22426  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
22427  if (__pyx_t_1) {
22428 
22429  /* "View.MemoryView":249
22430  *
22431  * if buf == NULL:
22432  * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
22433  * else:
22434  * result = array(shape, itemsize, format, mode.decode('ASCII'),
22435  */
22436  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
22437  __Pyx_GOTREF(__pyx_t_2);
22438  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
22439  __Pyx_GOTREF(__pyx_t_3);
22440  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
22441  __Pyx_GOTREF(__pyx_t_4);
22442  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
22443  __Pyx_GOTREF(__pyx_t_5);
22444  __Pyx_INCREF(__pyx_v_shape);
22445  __Pyx_GIVEREF(__pyx_v_shape);
22446  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
22447  __Pyx_GIVEREF(__pyx_t_2);
22448  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
22449  __Pyx_GIVEREF(__pyx_t_3);
22450  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
22451  __Pyx_GIVEREF(__pyx_t_4);
22452  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
22453  __pyx_t_2 = 0;
22454  __pyx_t_3 = 0;
22455  __pyx_t_4 = 0;
22456  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
22457  __Pyx_GOTREF(__pyx_t_4);
22458  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22459  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
22460  __pyx_t_4 = 0;
22461 
22462  /* "View.MemoryView":248
22463  * cdef array result
22464  *
22465  * if buf == NULL: # <<<<<<<<<<<<<<
22466  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22467  * else:
22468  */
22469  goto __pyx_L3;
22470  }
22471 
22472  /* "View.MemoryView":251
22473  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22474  * else:
22475  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
22476  * allocate_buffer=False)
22477  * result.data = buf
22478  */
22479  /*else*/ {
22480  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
22481  __Pyx_GOTREF(__pyx_t_4);
22482  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
22483  __Pyx_GOTREF(__pyx_t_5);
22484  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
22485  __Pyx_GOTREF(__pyx_t_3);
22486  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
22487  __Pyx_GOTREF(__pyx_t_2);
22488  __Pyx_INCREF(__pyx_v_shape);
22489  __Pyx_GIVEREF(__pyx_v_shape);
22490  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
22491  __Pyx_GIVEREF(__pyx_t_4);
22492  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
22493  __Pyx_GIVEREF(__pyx_t_5);
22494  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
22495  __Pyx_GIVEREF(__pyx_t_3);
22496  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
22497  __pyx_t_4 = 0;
22498  __pyx_t_5 = 0;
22499  __pyx_t_3 = 0;
22500 
22501  /* "View.MemoryView":252
22502  * else:
22503  * result = array(shape, itemsize, format, mode.decode('ASCII'),
22504  * allocate_buffer=False) # <<<<<<<<<<<<<<
22505  * result.data = buf
22506  *
22507  */
22508  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
22509  __Pyx_GOTREF(__pyx_t_3);
22510  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
22511 
22512  /* "View.MemoryView":251
22513  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22514  * else:
22515  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
22516  * allocate_buffer=False)
22517  * result.data = buf
22518  */
22519  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
22520  __Pyx_GOTREF(__pyx_t_5);
22521  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22522  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22523  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
22524  __pyx_t_5 = 0;
22525 
22526  /* "View.MemoryView":253
22527  * result = array(shape, itemsize, format, mode.decode('ASCII'),
22528  * allocate_buffer=False)
22529  * result.data = buf # <<<<<<<<<<<<<<
22530  *
22531  * return result
22532  */
22533  __pyx_v_result->data = __pyx_v_buf;
22534  }
22535  __pyx_L3:;
22536 
22537  /* "View.MemoryView":255
22538  * result.data = buf
22539  *
22540  * return result # <<<<<<<<<<<<<<
22541  *
22542  *
22543  */
22544  __Pyx_XDECREF(((PyObject *)__pyx_r));
22545  __Pyx_INCREF(((PyObject *)__pyx_v_result));
22546  __pyx_r = __pyx_v_result;
22547  goto __pyx_L0;
22548 
22549  /* "View.MemoryView":244
22550  *
22551  * @cname("__pyx_array_new")
22552  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
22553  * char *mode, char *buf):
22554  * cdef array result
22555  */
22556 
22557  /* function exit code */
22558  __pyx_L1_error:;
22559  __Pyx_XDECREF(__pyx_t_2);
22560  __Pyx_XDECREF(__pyx_t_3);
22561  __Pyx_XDECREF(__pyx_t_4);
22562  __Pyx_XDECREF(__pyx_t_5);
22563  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
22564  __pyx_r = 0;
22565  __pyx_L0:;
22566  __Pyx_XDECREF((PyObject *)__pyx_v_result);
22567  __Pyx_XGIVEREF((PyObject *)__pyx_r);
22568  __Pyx_RefNannyFinishContext();
22569  return __pyx_r;
22570 }
22571 
22572 /* "View.MemoryView":281
22573  * cdef class Enum(object):
22574  * cdef object name
22575  * def __init__(self, name): # <<<<<<<<<<<<<<
22576  * self.name = name
22577  * def __repr__(self):
22578  */
22579 
22580 /* Python wrapper */
22581 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22582 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22583  PyObject *__pyx_v_name = 0;
22584  int __pyx_r;
22585  __Pyx_RefNannyDeclarations
22586  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
22587  {
22588  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
22589  PyObject* values[1] = {0};
22590  if (unlikely(__pyx_kwds)) {
22591  Py_ssize_t kw_args;
22592  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22593  switch (pos_args) {
22594  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22595  CYTHON_FALLTHROUGH;
22596  case 0: break;
22597  default: goto __pyx_L5_argtuple_error;
22598  }
22599  kw_args = PyDict_Size(__pyx_kwds);
22600  switch (pos_args) {
22601  case 0:
22602  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
22603  else goto __pyx_L5_argtuple_error;
22604  }
22605  if (unlikely(kw_args > 0)) {
22606  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 281, __pyx_L3_error)
22607  }
22608  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
22609  goto __pyx_L5_argtuple_error;
22610  } else {
22611  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22612  }
22613  __pyx_v_name = values[0];
22614  }
22615  goto __pyx_L4_argument_unpacking_done;
22616  __pyx_L5_argtuple_error:;
22617  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 281, __pyx_L3_error)
22618  __pyx_L3_error:;
22619  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22620  __Pyx_RefNannyFinishContext();
22621  return -1;
22622  __pyx_L4_argument_unpacking_done:;
22623  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
22624 
22625  /* function exit code */
22626  __Pyx_RefNannyFinishContext();
22627  return __pyx_r;
22628 }
22629 
22630 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
22631  int __pyx_r;
22632  __Pyx_RefNannyDeclarations
22633  __Pyx_RefNannySetupContext("__init__", 0);
22634 
22635  /* "View.MemoryView":282
22636  * cdef object name
22637  * def __init__(self, name):
22638  * self.name = name # <<<<<<<<<<<<<<
22639  * def __repr__(self):
22640  * return self.name
22641  */
22642  __Pyx_INCREF(__pyx_v_name);
22643  __Pyx_GIVEREF(__pyx_v_name);
22644  __Pyx_GOTREF(__pyx_v_self->name);
22645  __Pyx_DECREF(__pyx_v_self->name);
22646  __pyx_v_self->name = __pyx_v_name;
22647 
22648  /* "View.MemoryView":281
22649  * cdef class Enum(object):
22650  * cdef object name
22651  * def __init__(self, name): # <<<<<<<<<<<<<<
22652  * self.name = name
22653  * def __repr__(self):
22654  */
22655 
22656  /* function exit code */
22657  __pyx_r = 0;
22658  __Pyx_RefNannyFinishContext();
22659  return __pyx_r;
22660 }
22661 
22662 /* "View.MemoryView":283
22663  * def __init__(self, name):
22664  * self.name = name
22665  * def __repr__(self): # <<<<<<<<<<<<<<
22666  * return self.name
22667  *
22668  */
22669 
22670 /* Python wrapper */
22671 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
22672 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
22673  PyObject *__pyx_r = 0;
22674  __Pyx_RefNannyDeclarations
22675  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
22676  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
22677 
22678  /* function exit code */
22679  __Pyx_RefNannyFinishContext();
22680  return __pyx_r;
22681 }
22682 
22683 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
22684  PyObject *__pyx_r = NULL;
22685  __Pyx_RefNannyDeclarations
22686  __Pyx_RefNannySetupContext("__repr__", 0);
22687 
22688  /* "View.MemoryView":284
22689  * self.name = name
22690  * def __repr__(self):
22691  * return self.name # <<<<<<<<<<<<<<
22692  *
22693  * cdef generic = Enum("<strided and direct or indirect>")
22694  */
22695  __Pyx_XDECREF(__pyx_r);
22696  __Pyx_INCREF(__pyx_v_self->name);
22697  __pyx_r = __pyx_v_self->name;
22698  goto __pyx_L0;
22699 
22700  /* "View.MemoryView":283
22701  * def __init__(self, name):
22702  * self.name = name
22703  * def __repr__(self): # <<<<<<<<<<<<<<
22704  * return self.name
22705  *
22706  */
22707 
22708  /* function exit code */
22709  __pyx_L0:;
22710  __Pyx_XGIVEREF(__pyx_r);
22711  __Pyx_RefNannyFinishContext();
22712  return __pyx_r;
22713 }
22714 
22715 /* "(tree fragment)":1
22716  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22717  * cdef tuple state
22718  * cdef object _dict
22719  */
22720 
22721 /* Python wrapper */
22722 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
22723 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
22724  PyObject *__pyx_r = 0;
22725  __Pyx_RefNannyDeclarations
22726  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
22727  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
22728 
22729  /* function exit code */
22730  __Pyx_RefNannyFinishContext();
22731  return __pyx_r;
22732 }
22733 
22734 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
22735  PyObject *__pyx_v_state = 0;
22736  PyObject *__pyx_v__dict = 0;
22737  int __pyx_v_use_setstate;
22738  PyObject *__pyx_r = NULL;
22739  __Pyx_RefNannyDeclarations
22740  PyObject *__pyx_t_1 = NULL;
22741  int __pyx_t_2;
22742  int __pyx_t_3;
22743  PyObject *__pyx_t_4 = NULL;
22744  PyObject *__pyx_t_5 = NULL;
22745  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
22746 
22747  /* "(tree fragment)":5
22748  * cdef object _dict
22749  * cdef bint use_setstate
22750  * state = (self.name,) # <<<<<<<<<<<<<<
22751  * _dict = getattr(self, '__dict__', None)
22752  * if _dict is not None:
22753  */
22754  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
22755  __Pyx_GOTREF(__pyx_t_1);
22756  __Pyx_INCREF(__pyx_v_self->name);
22757  __Pyx_GIVEREF(__pyx_v_self->name);
22758  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
22759  __pyx_v_state = ((PyObject*)__pyx_t_1);
22760  __pyx_t_1 = 0;
22761 
22762  /* "(tree fragment)":6
22763  * cdef bint use_setstate
22764  * state = (self.name,)
22765  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
22766  * if _dict is not None:
22767  * state += (_dict,)
22768  */
22769  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
22770  __Pyx_GOTREF(__pyx_t_1);
22771  __pyx_v__dict = __pyx_t_1;
22772  __pyx_t_1 = 0;
22773 
22774  /* "(tree fragment)":7
22775  * state = (self.name,)
22776  * _dict = getattr(self, '__dict__', None)
22777  * if _dict is not None: # <<<<<<<<<<<<<<
22778  * state += (_dict,)
22779  * use_setstate = True
22780  */
22781  __pyx_t_2 = (__pyx_v__dict != Py_None);
22782  __pyx_t_3 = (__pyx_t_2 != 0);
22783  if (__pyx_t_3) {
22784 
22785  /* "(tree fragment)":8
22786  * _dict = getattr(self, '__dict__', None)
22787  * if _dict is not None:
22788  * state += (_dict,) # <<<<<<<<<<<<<<
22789  * use_setstate = True
22790  * else:
22791  */
22792  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
22793  __Pyx_GOTREF(__pyx_t_1);
22794  __Pyx_INCREF(__pyx_v__dict);
22795  __Pyx_GIVEREF(__pyx_v__dict);
22796  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
22797  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
22798  __Pyx_GOTREF(__pyx_t_4);
22799  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22800  __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
22801  __pyx_t_4 = 0;
22802 
22803  /* "(tree fragment)":9
22804  * if _dict is not None:
22805  * state += (_dict,)
22806  * use_setstate = True # <<<<<<<<<<<<<<
22807  * else:
22808  * use_setstate = self.name is not None
22809  */
22810  __pyx_v_use_setstate = 1;
22811 
22812  /* "(tree fragment)":7
22813  * state = (self.name,)
22814  * _dict = getattr(self, '__dict__', None)
22815  * if _dict is not None: # <<<<<<<<<<<<<<
22816  * state += (_dict,)
22817  * use_setstate = True
22818  */
22819  goto __pyx_L3;
22820  }
22821 
22822  /* "(tree fragment)":11
22823  * use_setstate = True
22824  * else:
22825  * use_setstate = self.name is not None # <<<<<<<<<<<<<<
22826  * if use_setstate:
22827  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22828  */
22829  /*else*/ {
22830  __pyx_t_3 = (__pyx_v_self->name != Py_None);
22831  __pyx_v_use_setstate = __pyx_t_3;
22832  }
22833  __pyx_L3:;
22834 
22835  /* "(tree fragment)":12
22836  * else:
22837  * use_setstate = self.name is not None
22838  * if use_setstate: # <<<<<<<<<<<<<<
22839  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22840  * else:
22841  */
22842  __pyx_t_3 = (__pyx_v_use_setstate != 0);
22843  if (__pyx_t_3) {
22844 
22845  /* "(tree fragment)":13
22846  * use_setstate = self.name is not None
22847  * if use_setstate:
22848  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
22849  * else:
22850  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22851  */
22852  __Pyx_XDECREF(__pyx_r);
22853  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
22854  __Pyx_GOTREF(__pyx_t_4);
22855  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
22856  __Pyx_GOTREF(__pyx_t_1);
22857  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22858  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22859  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22860  __Pyx_INCREF(__pyx_int_184977713);
22861  __Pyx_GIVEREF(__pyx_int_184977713);
22862  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
22863  __Pyx_INCREF(Py_None);
22864  __Pyx_GIVEREF(Py_None);
22865  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
22866  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13, __pyx_L1_error)
22867  __Pyx_GOTREF(__pyx_t_5);
22868  __Pyx_GIVEREF(__pyx_t_4);
22869  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
22870  __Pyx_GIVEREF(__pyx_t_1);
22871  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
22872  __Pyx_INCREF(__pyx_v_state);
22873  __Pyx_GIVEREF(__pyx_v_state);
22874  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
22875  __pyx_t_4 = 0;
22876  __pyx_t_1 = 0;
22877  __pyx_r = __pyx_t_5;
22878  __pyx_t_5 = 0;
22879  goto __pyx_L0;
22880 
22881  /* "(tree fragment)":12
22882  * else:
22883  * use_setstate = self.name is not None
22884  * if use_setstate: # <<<<<<<<<<<<<<
22885  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22886  * else:
22887  */
22888  }
22889 
22890  /* "(tree fragment)":15
22891  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22892  * else:
22893  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
22894  * def __setstate_cython__(self, __pyx_state):
22895  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22896  */
22897  /*else*/ {
22898  __Pyx_XDECREF(__pyx_r);
22899  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error)
22900  __Pyx_GOTREF(__pyx_t_5);
22901  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
22902  __Pyx_GOTREF(__pyx_t_1);
22903  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22904  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22905  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22906  __Pyx_INCREF(__pyx_int_184977713);
22907  __Pyx_GIVEREF(__pyx_int_184977713);
22908  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
22909  __Pyx_INCREF(__pyx_v_state);
22910  __Pyx_GIVEREF(__pyx_v_state);
22911  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
22912  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)
22913  __Pyx_GOTREF(__pyx_t_4);
22914  __Pyx_GIVEREF(__pyx_t_5);
22915  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
22916  __Pyx_GIVEREF(__pyx_t_1);
22917  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
22918  __pyx_t_5 = 0;
22919  __pyx_t_1 = 0;
22920  __pyx_r = __pyx_t_4;
22921  __pyx_t_4 = 0;
22922  goto __pyx_L0;
22923  }
22924 
22925  /* "(tree fragment)":1
22926  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22927  * cdef tuple state
22928  * cdef object _dict
22929  */
22930 
22931  /* function exit code */
22932  __pyx_L1_error:;
22933  __Pyx_XDECREF(__pyx_t_1);
22934  __Pyx_XDECREF(__pyx_t_4);
22935  __Pyx_XDECREF(__pyx_t_5);
22936  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22937  __pyx_r = NULL;
22938  __pyx_L0:;
22939  __Pyx_XDECREF(__pyx_v_state);
22940  __Pyx_XDECREF(__pyx_v__dict);
22941  __Pyx_XGIVEREF(__pyx_r);
22942  __Pyx_RefNannyFinishContext();
22943  return __pyx_r;
22944 }
22945 
22946 /* "(tree fragment)":16
22947  * else:
22948  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22949  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22950  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22951  */
22952 
22953 /* Python wrapper */
22954 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
22955 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22956  PyObject *__pyx_r = 0;
22957  __Pyx_RefNannyDeclarations
22958  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
22959  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
22960 
22961  /* function exit code */
22962  __Pyx_RefNannyFinishContext();
22963  return __pyx_r;
22964 }
22965 
22966 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22967  PyObject *__pyx_r = NULL;
22968  __Pyx_RefNannyDeclarations
22969  PyObject *__pyx_t_1 = NULL;
22970  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
22971 
22972  /* "(tree fragment)":17
22973  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22974  * def __setstate_cython__(self, __pyx_state):
22975  * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
22976  */
22977  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 17, __pyx_L1_error)
22978  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
22979  __Pyx_GOTREF(__pyx_t_1);
22980  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22981 
22982  /* "(tree fragment)":16
22983  * else:
22984  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22985  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22986  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22987  */
22988 
22989  /* function exit code */
22990  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22991  goto __pyx_L0;
22992  __pyx_L1_error:;
22993  __Pyx_XDECREF(__pyx_t_1);
22994  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22995  __pyx_r = NULL;
22996  __pyx_L0:;
22997  __Pyx_XGIVEREF(__pyx_r);
22998  __Pyx_RefNannyFinishContext();
22999  return __pyx_r;
23000 }
23001 
23002 /* "View.MemoryView":298
23003  *
23004  * @cname('__pyx_align_pointer')
23005  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
23006  * "Align pointer memory on a given boundary"
23007  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
23008  */
23009 
23010 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
23011  Py_intptr_t __pyx_v_aligned_p;
23012  size_t __pyx_v_offset;
23013  void *__pyx_r;
23014  int __pyx_t_1;
23015 
23016  /* "View.MemoryView":300
23017  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
23018  * "Align pointer memory on a given boundary"
23019  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
23020  * cdef size_t offset
23021  *
23022  */
23023  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
23024 
23025  /* "View.MemoryView":304
23026  *
23027  * with cython.cdivision(True):
23028  * offset = aligned_p % alignment # <<<<<<<<<<<<<<
23029  *
23030  * if offset > 0:
23031  */
23032  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
23033 
23034  /* "View.MemoryView":306
23035  * offset = aligned_p % alignment
23036  *
23037  * if offset > 0: # <<<<<<<<<<<<<<
23038  * aligned_p += alignment - offset
23039  *
23040  */
23041  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
23042  if (__pyx_t_1) {
23043 
23044  /* "View.MemoryView":307
23045  *
23046  * if offset > 0:
23047  * aligned_p += alignment - offset # <<<<<<<<<<<<<<
23048  *
23049  * return <void *> aligned_p
23050  */
23051  __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
23052 
23053  /* "View.MemoryView":306
23054  * offset = aligned_p % alignment
23055  *
23056  * if offset > 0: # <<<<<<<<<<<<<<
23057  * aligned_p += alignment - offset
23058  *
23059  */
23060  }
23061 
23062  /* "View.MemoryView":309
23063  * aligned_p += alignment - offset
23064  *
23065  * return <void *> aligned_p # <<<<<<<<<<<<<<
23066  *
23067  *
23068  */
23069  __pyx_r = ((void *)__pyx_v_aligned_p);
23070  goto __pyx_L0;
23071 
23072  /* "View.MemoryView":298
23073  *
23074  * @cname('__pyx_align_pointer')
23075  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
23076  * "Align pointer memory on a given boundary"
23077  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
23078  */
23079 
23080  /* function exit code */
23081  __pyx_L0:;
23082  return __pyx_r;
23083 }
23084 
23085 /* "View.MemoryView":345
23086  * cdef __Pyx_TypeInfo *typeinfo
23087  *
23088  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
23089  * self.obj = obj
23090  * self.flags = flags
23091  */
23092 
23093 /* Python wrapper */
23094 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23095 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23096  PyObject *__pyx_v_obj = 0;
23097  int __pyx_v_flags;
23098  int __pyx_v_dtype_is_object;
23099  int __pyx_r;
23100  __Pyx_RefNannyDeclarations
23101  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
23102  {
23103  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
23104  PyObject* values[3] = {0,0,0};
23105  if (unlikely(__pyx_kwds)) {
23106  Py_ssize_t kw_args;
23107  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23108  switch (pos_args) {
23109  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23110  CYTHON_FALLTHROUGH;
23111  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23112  CYTHON_FALLTHROUGH;
23113  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23114  CYTHON_FALLTHROUGH;
23115  case 0: break;
23116  default: goto __pyx_L5_argtuple_error;
23117  }
23118  kw_args = PyDict_Size(__pyx_kwds);
23119  switch (pos_args) {
23120  case 0:
23121  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
23122  else goto __pyx_L5_argtuple_error;
23123  CYTHON_FALLTHROUGH;
23124  case 1:
23125  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
23126  else {
23127  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 345, __pyx_L3_error)
23128  }
23129  CYTHON_FALLTHROUGH;
23130  case 2:
23131  if (kw_args > 0) {
23132  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
23133  if (value) { values[2] = value; kw_args--; }
23134  }
23135  }
23136  if (unlikely(kw_args > 0)) {
23137  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 345, __pyx_L3_error)
23138  }
23139  } else {
23140  switch (PyTuple_GET_SIZE(__pyx_args)) {
23141  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23142  CYTHON_FALLTHROUGH;
23143  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23144  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23145  break;
23146  default: goto __pyx_L5_argtuple_error;
23147  }
23148  }
23149  __pyx_v_obj = values[0];
23150  __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
23151  if (values[2]) {
23152  __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
23153  } else {
23154  __pyx_v_dtype_is_object = ((int)0);
23155  }
23156  }
23157  goto __pyx_L4_argument_unpacking_done;
23158  __pyx_L5_argtuple_error:;
23159  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 345, __pyx_L3_error)
23160  __pyx_L3_error:;
23161  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23162  __Pyx_RefNannyFinishContext();
23163  return -1;
23164  __pyx_L4_argument_unpacking_done:;
23165  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
23166 
23167  /* function exit code */
23168  __Pyx_RefNannyFinishContext();
23169  return __pyx_r;
23170 }
23171 
23172 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
23173  int __pyx_r;
23174  __Pyx_RefNannyDeclarations
23175  int __pyx_t_1;
23176  int __pyx_t_2;
23177  int __pyx_t_3;
23178  int __pyx_t_4;
23179  __Pyx_RefNannySetupContext("__cinit__", 0);
23180 
23181  /* "View.MemoryView":346
23182  *
23183  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
23184  * self.obj = obj # <<<<<<<<<<<<<<
23185  * self.flags = flags
23186  * if type(self) is memoryview or obj is not None:
23187  */
23188  __Pyx_INCREF(__pyx_v_obj);
23189  __Pyx_GIVEREF(__pyx_v_obj);
23190  __Pyx_GOTREF(__pyx_v_self->obj);
23191  __Pyx_DECREF(__pyx_v_self->obj);
23192  __pyx_v_self->obj = __pyx_v_obj;
23193 
23194  /* "View.MemoryView":347
23195  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
23196  * self.obj = obj
23197  * self.flags = flags # <<<<<<<<<<<<<<
23198  * if type(self) is memoryview or obj is not None:
23199  * __Pyx_GetBuffer(obj, &self.view, flags)
23200  */
23201  __pyx_v_self->flags = __pyx_v_flags;
23202 
23203  /* "View.MemoryView":348
23204  * self.obj = obj
23205  * self.flags = flags
23206  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
23207  * __Pyx_GetBuffer(obj, &self.view, flags)
23208  * if <PyObject *> self.view.obj == NULL:
23209  */
23210  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
23211  __pyx_t_3 = (__pyx_t_2 != 0);
23212  if (!__pyx_t_3) {
23213  } else {
23214  __pyx_t_1 = __pyx_t_3;
23215  goto __pyx_L4_bool_binop_done;
23216  }
23217  __pyx_t_3 = (__pyx_v_obj != Py_None);
23218  __pyx_t_2 = (__pyx_t_3 != 0);
23219  __pyx_t_1 = __pyx_t_2;
23220  __pyx_L4_bool_binop_done:;
23221  if (__pyx_t_1) {
23222 
23223  /* "View.MemoryView":349
23224  * self.flags = flags
23225  * if type(self) is memoryview or obj is not None:
23226  * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
23227  * if <PyObject *> self.view.obj == NULL:
23228  * (<__pyx_buffer *> &self.view).obj = Py_None
23229  */
23230  __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 349, __pyx_L1_error)
23231 
23232  /* "View.MemoryView":350
23233  * if type(self) is memoryview or obj is not None:
23234  * __Pyx_GetBuffer(obj, &self.view, flags)
23235  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
23236  * (<__pyx_buffer *> &self.view).obj = Py_None
23237  * Py_INCREF(Py_None)
23238  */
23239  __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
23240  if (__pyx_t_1) {
23241 
23242  /* "View.MemoryView":351
23243  * __Pyx_GetBuffer(obj, &self.view, flags)
23244  * if <PyObject *> self.view.obj == NULL:
23245  * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
23246  * Py_INCREF(Py_None)
23247  *
23248  */
23249  ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
23250 
23251  /* "View.MemoryView":352
23252  * if <PyObject *> self.view.obj == NULL:
23253  * (<__pyx_buffer *> &self.view).obj = Py_None
23254  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
23255  *
23256  * global __pyx_memoryview_thread_locks_used
23257  */
23258  Py_INCREF(Py_None);
23259 
23260  /* "View.MemoryView":350
23261  * if type(self) is memoryview or obj is not None:
23262  * __Pyx_GetBuffer(obj, &self.view, flags)
23263  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
23264  * (<__pyx_buffer *> &self.view).obj = Py_None
23265  * Py_INCREF(Py_None)
23266  */
23267  }
23268 
23269  /* "View.MemoryView":348
23270  * self.obj = obj
23271  * self.flags = flags
23272  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
23273  * __Pyx_GetBuffer(obj, &self.view, flags)
23274  * if <PyObject *> self.view.obj == NULL:
23275  */
23276  }
23277 
23278  /* "View.MemoryView":355
23279  *
23280  * global __pyx_memoryview_thread_locks_used
23281  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
23282  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23283  * __pyx_memoryview_thread_locks_used += 1
23284  */
23285  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
23286  if (__pyx_t_1) {
23287 
23288  /* "View.MemoryView":356
23289  * global __pyx_memoryview_thread_locks_used
23290  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
23291  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
23292  * __pyx_memoryview_thread_locks_used += 1
23293  * if self.lock is NULL:
23294  */
23295  __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
23296 
23297  /* "View.MemoryView":357
23298  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
23299  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23300  * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
23301  * if self.lock is NULL:
23302  * self.lock = PyThread_allocate_lock()
23303  */
23304  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
23305 
23306  /* "View.MemoryView":355
23307  *
23308  * global __pyx_memoryview_thread_locks_used
23309  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
23310  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23311  * __pyx_memoryview_thread_locks_used += 1
23312  */
23313  }
23314 
23315  /* "View.MemoryView":358
23316  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23317  * __pyx_memoryview_thread_locks_used += 1
23318  * if self.lock is NULL: # <<<<<<<<<<<<<<
23319  * self.lock = PyThread_allocate_lock()
23320  * if self.lock is NULL:
23321  */
23322  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
23323  if (__pyx_t_1) {
23324 
23325  /* "View.MemoryView":359
23326  * __pyx_memoryview_thread_locks_used += 1
23327  * if self.lock is NULL:
23328  * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
23329  * if self.lock is NULL:
23330  * raise MemoryError
23331  */
23332  __pyx_v_self->lock = PyThread_allocate_lock();
23333 
23334  /* "View.MemoryView":360
23335  * if self.lock is NULL:
23336  * self.lock = PyThread_allocate_lock()
23337  * if self.lock is NULL: # <<<<<<<<<<<<<<
23338  * raise MemoryError
23339  *
23340  */
23341  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
23342  if (unlikely(__pyx_t_1)) {
23343 
23344  /* "View.MemoryView":361
23345  * self.lock = PyThread_allocate_lock()
23346  * if self.lock is NULL:
23347  * raise MemoryError # <<<<<<<<<<<<<<
23348  *
23349  * if flags & PyBUF_FORMAT:
23350  */
23351  PyErr_NoMemory(); __PYX_ERR(0, 361, __pyx_L1_error)
23352 
23353  /* "View.MemoryView":360
23354  * if self.lock is NULL:
23355  * self.lock = PyThread_allocate_lock()
23356  * if self.lock is NULL: # <<<<<<<<<<<<<<
23357  * raise MemoryError
23358  *
23359  */
23360  }
23361 
23362  /* "View.MemoryView":358
23363  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23364  * __pyx_memoryview_thread_locks_used += 1
23365  * if self.lock is NULL: # <<<<<<<<<<<<<<
23366  * self.lock = PyThread_allocate_lock()
23367  * if self.lock is NULL:
23368  */
23369  }
23370 
23371  /* "View.MemoryView":363
23372  * raise MemoryError
23373  *
23374  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
23375  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
23376  * else:
23377  */
23378  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
23379  if (__pyx_t_1) {
23380 
23381  /* "View.MemoryView":364
23382  *
23383  * if flags & PyBUF_FORMAT:
23384  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
23385  * else:
23386  * self.dtype_is_object = dtype_is_object
23387  */
23388  __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
23389  if (__pyx_t_2) {
23390  } else {
23391  __pyx_t_1 = __pyx_t_2;
23392  goto __pyx_L11_bool_binop_done;
23393  }
23394  __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
23395  __pyx_t_1 = __pyx_t_2;
23396  __pyx_L11_bool_binop_done:;
23397  __pyx_v_self->dtype_is_object = __pyx_t_1;
23398 
23399  /* "View.MemoryView":363
23400  * raise MemoryError
23401  *
23402  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
23403  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
23404  * else:
23405  */
23406  goto __pyx_L10;
23407  }
23408 
23409  /* "View.MemoryView":366
23410  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
23411  * else:
23412  * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
23413  *
23414  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
23415  */
23416  /*else*/ {
23417  __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
23418  }
23419  __pyx_L10:;
23420 
23421  /* "View.MemoryView":368
23422  * self.dtype_is_object = dtype_is_object
23423  *
23424  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
23425  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
23426  * self.typeinfo = NULL
23427  */
23428  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
23429 
23430  /* "View.MemoryView":370
23431  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
23432  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
23433  * self.typeinfo = NULL # <<<<<<<<<<<<<<
23434  *
23435  * def __dealloc__(memoryview self):
23436  */
23437  __pyx_v_self->typeinfo = NULL;
23438 
23439  /* "View.MemoryView":345
23440  * cdef __Pyx_TypeInfo *typeinfo
23441  *
23442  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
23443  * self.obj = obj
23444  * self.flags = flags
23445  */
23446 
23447  /* function exit code */
23448  __pyx_r = 0;
23449  goto __pyx_L0;
23450  __pyx_L1_error:;
23451  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23452  __pyx_r = -1;
23453  __pyx_L0:;
23454  __Pyx_RefNannyFinishContext();
23455  return __pyx_r;
23456 }
23457 
23458 /* "View.MemoryView":372
23459  * self.typeinfo = NULL
23460  *
23461  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
23462  * if self.obj is not None:
23463  * __Pyx_ReleaseBuffer(&self.view)
23464  */
23465 
23466 /* Python wrapper */
23467 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
23468 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
23469  __Pyx_RefNannyDeclarations
23470  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
23471  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
23472 
23473  /* function exit code */
23474  __Pyx_RefNannyFinishContext();
23475 }
23476 
23477 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
23478  int __pyx_v_i;
23479  __Pyx_RefNannyDeclarations
23480  int __pyx_t_1;
23481  int __pyx_t_2;
23482  int __pyx_t_3;
23483  int __pyx_t_4;
23484  int __pyx_t_5;
23485  PyThread_type_lock __pyx_t_6;
23486  PyThread_type_lock __pyx_t_7;
23487  __Pyx_RefNannySetupContext("__dealloc__", 0);
23488 
23489  /* "View.MemoryView":373
23490  *
23491  * def __dealloc__(memoryview self):
23492  * if self.obj is not None: # <<<<<<<<<<<<<<
23493  * __Pyx_ReleaseBuffer(&self.view)
23494  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
23495  */
23496  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
23497  __pyx_t_2 = (__pyx_t_1 != 0);
23498  if (__pyx_t_2) {
23499 
23500  /* "View.MemoryView":374
23501  * def __dealloc__(memoryview self):
23502  * if self.obj is not None:
23503  * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
23504  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
23505  *
23506  */
23507  __Pyx_ReleaseBuffer((&__pyx_v_self->view));
23508 
23509  /* "View.MemoryView":373
23510  *
23511  * def __dealloc__(memoryview self):
23512  * if self.obj is not None: # <<<<<<<<<<<<<<
23513  * __Pyx_ReleaseBuffer(&self.view)
23514  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
23515  */
23516  goto __pyx_L3;
23517  }
23518 
23519  /* "View.MemoryView":375
23520  * if self.obj is not None:
23521  * __Pyx_ReleaseBuffer(&self.view)
23522  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
23523  *
23524  * (<__pyx_buffer *> &self.view).obj = NULL
23525  */
23526  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
23527  if (__pyx_t_2) {
23528 
23529  /* "View.MemoryView":377
23530  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
23531  *
23532  * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
23533  * Py_DECREF(Py_None)
23534  *
23535  */
23536  ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
23537 
23538  /* "View.MemoryView":378
23539  *
23540  * (<__pyx_buffer *> &self.view).obj = NULL
23541  * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
23542  *
23543  * cdef int i
23544  */
23545  Py_DECREF(Py_None);
23546 
23547  /* "View.MemoryView":375
23548  * if self.obj is not None:
23549  * __Pyx_ReleaseBuffer(&self.view)
23550  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
23551  *
23552  * (<__pyx_buffer *> &self.view).obj = NULL
23553  */
23554  }
23555  __pyx_L3:;
23556 
23557  /* "View.MemoryView":382
23558  * cdef int i
23559  * global __pyx_memoryview_thread_locks_used
23560  * if self.lock != NULL: # <<<<<<<<<<<<<<
23561  * for i in range(__pyx_memoryview_thread_locks_used):
23562  * if __pyx_memoryview_thread_locks[i] is self.lock:
23563  */
23564  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
23565  if (__pyx_t_2) {
23566 
23567  /* "View.MemoryView":383
23568  * global __pyx_memoryview_thread_locks_used
23569  * if self.lock != NULL:
23570  * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
23571  * if __pyx_memoryview_thread_locks[i] is self.lock:
23572  * __pyx_memoryview_thread_locks_used -= 1
23573  */
23574  __pyx_t_3 = __pyx_memoryview_thread_locks_used;
23575  __pyx_t_4 = __pyx_t_3;
23576  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
23577  __pyx_v_i = __pyx_t_5;
23578 
23579  /* "View.MemoryView":384
23580  * if self.lock != NULL:
23581  * for i in range(__pyx_memoryview_thread_locks_used):
23582  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
23583  * __pyx_memoryview_thread_locks_used -= 1
23584  * if i != __pyx_memoryview_thread_locks_used:
23585  */
23586  __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
23587  if (__pyx_t_2) {
23588 
23589  /* "View.MemoryView":385
23590  * for i in range(__pyx_memoryview_thread_locks_used):
23591  * if __pyx_memoryview_thread_locks[i] is self.lock:
23592  * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
23593  * if i != __pyx_memoryview_thread_locks_used:
23594  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23595  */
23596  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
23597 
23598  /* "View.MemoryView":386
23599  * if __pyx_memoryview_thread_locks[i] is self.lock:
23600  * __pyx_memoryview_thread_locks_used -= 1
23601  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
23602  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23603  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23604  */
23605  __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
23606  if (__pyx_t_2) {
23607 
23608  /* "View.MemoryView":388
23609  * if i != __pyx_memoryview_thread_locks_used:
23610  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23611  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
23612  * break
23613  * else:
23614  */
23615  __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
23616  __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
23617 
23618  /* "View.MemoryView":387
23619  * __pyx_memoryview_thread_locks_used -= 1
23620  * if i != __pyx_memoryview_thread_locks_used:
23621  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
23622  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23623  * break
23624  */
23625  (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
23626  (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
23627 
23628  /* "View.MemoryView":386
23629  * if __pyx_memoryview_thread_locks[i] is self.lock:
23630  * __pyx_memoryview_thread_locks_used -= 1
23631  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
23632  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23633  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23634  */
23635  }
23636 
23637  /* "View.MemoryView":389
23638  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23639  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23640  * break # <<<<<<<<<<<<<<
23641  * else:
23642  * PyThread_free_lock(self.lock)
23643  */
23644  goto __pyx_L6_break;
23645 
23646  /* "View.MemoryView":384
23647  * if self.lock != NULL:
23648  * for i in range(__pyx_memoryview_thread_locks_used):
23649  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
23650  * __pyx_memoryview_thread_locks_used -= 1
23651  * if i != __pyx_memoryview_thread_locks_used:
23652  */
23653  }
23654  }
23655  /*else*/ {
23656 
23657  /* "View.MemoryView":391
23658  * break
23659  * else:
23660  * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
23661  *
23662  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
23663  */
23664  PyThread_free_lock(__pyx_v_self->lock);
23665  }
23666  __pyx_L6_break:;
23667 
23668  /* "View.MemoryView":382
23669  * cdef int i
23670  * global __pyx_memoryview_thread_locks_used
23671  * if self.lock != NULL: # <<<<<<<<<<<<<<
23672  * for i in range(__pyx_memoryview_thread_locks_used):
23673  * if __pyx_memoryview_thread_locks[i] is self.lock:
23674  */
23675  }
23676 
23677  /* "View.MemoryView":372
23678  * self.typeinfo = NULL
23679  *
23680  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
23681  * if self.obj is not None:
23682  * __Pyx_ReleaseBuffer(&self.view)
23683  */
23684 
23685  /* function exit code */
23686  __Pyx_RefNannyFinishContext();
23687 }
23688 
23689 /* "View.MemoryView":393
23690  * PyThread_free_lock(self.lock)
23691  *
23692  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
23693  * cdef Py_ssize_t dim
23694  * cdef char *itemp = <char *> self.view.buf
23695  */
23696 
23697 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
23698  Py_ssize_t __pyx_v_dim;
23699  char *__pyx_v_itemp;
23700  PyObject *__pyx_v_idx = NULL;
23701  char *__pyx_r;
23702  __Pyx_RefNannyDeclarations
23703  Py_ssize_t __pyx_t_1;
23704  PyObject *__pyx_t_2 = NULL;
23705  Py_ssize_t __pyx_t_3;
23706  PyObject *(*__pyx_t_4)(PyObject *);
23707  PyObject *__pyx_t_5 = NULL;
23708  Py_ssize_t __pyx_t_6;
23709  char *__pyx_t_7;
23710  __Pyx_RefNannySetupContext("get_item_pointer", 0);
23711 
23712  /* "View.MemoryView":395
23713  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
23714  * cdef Py_ssize_t dim
23715  * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
23716  *
23717  * for dim, idx in enumerate(index):
23718  */
23719  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
23720 
23721  /* "View.MemoryView":397
23722  * cdef char *itemp = <char *> self.view.buf
23723  *
23724  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
23725  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23726  *
23727  */
23728  __pyx_t_1 = 0;
23729  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
23730  __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
23731  __pyx_t_4 = NULL;
23732  } else {
23733  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
23734  __Pyx_GOTREF(__pyx_t_2);
23735  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
23736  }
23737  for (;;) {
23738  if (likely(!__pyx_t_4)) {
23739  if (likely(PyList_CheckExact(__pyx_t_2))) {
23740  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
23741  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23742  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
23743  #else
23744  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
23745  __Pyx_GOTREF(__pyx_t_5);
23746  #endif
23747  } else {
23748  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
23749  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23750  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
23751  #else
23752  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
23753  __Pyx_GOTREF(__pyx_t_5);
23754  #endif
23755  }
23756  } else {
23757  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
23758  if (unlikely(!__pyx_t_5)) {
23759  PyObject* exc_type = PyErr_Occurred();
23760  if (exc_type) {
23761  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
23762  else __PYX_ERR(0, 397, __pyx_L1_error)
23763  }
23764  break;
23765  }
23766  __Pyx_GOTREF(__pyx_t_5);
23767  }
23768  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
23769  __pyx_t_5 = 0;
23770  __pyx_v_dim = __pyx_t_1;
23771  __pyx_t_1 = (__pyx_t_1 + 1);
23772 
23773  /* "View.MemoryView":398
23774  *
23775  * for dim, idx in enumerate(index):
23776  * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
23777  *
23778  * return itemp
23779  */
23780  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 398, __pyx_L1_error)
23781  __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 398, __pyx_L1_error)
23782  __pyx_v_itemp = __pyx_t_7;
23783 
23784  /* "View.MemoryView":397
23785  * cdef char *itemp = <char *> self.view.buf
23786  *
23787  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
23788  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23789  *
23790  */
23791  }
23792  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23793 
23794  /* "View.MemoryView":400
23795  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23796  *
23797  * return itemp # <<<<<<<<<<<<<<
23798  *
23799  *
23800  */
23801  __pyx_r = __pyx_v_itemp;
23802  goto __pyx_L0;
23803 
23804  /* "View.MemoryView":393
23805  * PyThread_free_lock(self.lock)
23806  *
23807  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
23808  * cdef Py_ssize_t dim
23809  * cdef char *itemp = <char *> self.view.buf
23810  */
23811 
23812  /* function exit code */
23813  __pyx_L1_error:;
23814  __Pyx_XDECREF(__pyx_t_2);
23815  __Pyx_XDECREF(__pyx_t_5);
23816  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
23817  __pyx_r = NULL;
23818  __pyx_L0:;
23819  __Pyx_XDECREF(__pyx_v_idx);
23820  __Pyx_RefNannyFinishContext();
23821  return __pyx_r;
23822 }
23823 
23824 /* "View.MemoryView":403
23825  *
23826  *
23827  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
23828  * if index is Ellipsis:
23829  * return self
23830  */
23831 
23832 /* Python wrapper */
23833 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
23834 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
23835  PyObject *__pyx_r = 0;
23836  __Pyx_RefNannyDeclarations
23837  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
23838  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
23839 
23840  /* function exit code */
23841  __Pyx_RefNannyFinishContext();
23842  return __pyx_r;
23843 }
23844 
23845 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
23846  PyObject *__pyx_v_have_slices = NULL;
23847  PyObject *__pyx_v_indices = NULL;
23848  char *__pyx_v_itemp;
23849  PyObject *__pyx_r = NULL;
23850  __Pyx_RefNannyDeclarations
23851  int __pyx_t_1;
23852  int __pyx_t_2;
23853  PyObject *__pyx_t_3 = NULL;
23854  PyObject *__pyx_t_4 = NULL;
23855  PyObject *__pyx_t_5 = NULL;
23856  char *__pyx_t_6;
23857  __Pyx_RefNannySetupContext("__getitem__", 0);
23858 
23859  /* "View.MemoryView":404
23860  *
23861  * def __getitem__(memoryview self, object index):
23862  * if index is Ellipsis: # <<<<<<<<<<<<<<
23863  * return self
23864  *
23865  */
23866  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
23867  __pyx_t_2 = (__pyx_t_1 != 0);
23868  if (__pyx_t_2) {
23869 
23870  /* "View.MemoryView":405
23871  * def __getitem__(memoryview self, object index):
23872  * if index is Ellipsis:
23873  * return self # <<<<<<<<<<<<<<
23874  *
23875  * have_slices, indices = _unellipsify(index, self.view.ndim)
23876  */
23877  __Pyx_XDECREF(__pyx_r);
23878  __Pyx_INCREF(((PyObject *)__pyx_v_self));
23879  __pyx_r = ((PyObject *)__pyx_v_self);
23880  goto __pyx_L0;
23881 
23882  /* "View.MemoryView":404
23883  *
23884  * def __getitem__(memoryview self, object index):
23885  * if index is Ellipsis: # <<<<<<<<<<<<<<
23886  * return self
23887  *
23888  */
23889  }
23890 
23891  /* "View.MemoryView":407
23892  * return self
23893  *
23894  * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
23895  *
23896  * cdef char *itemp
23897  */
23898  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
23899  __Pyx_GOTREF(__pyx_t_3);
23900  if (likely(__pyx_t_3 != Py_None)) {
23901  PyObject* sequence = __pyx_t_3;
23902  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
23903  if (unlikely(size != 2)) {
23904  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
23905  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
23906  __PYX_ERR(0, 407, __pyx_L1_error)
23907  }
23908  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23909  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
23910  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
23911  __Pyx_INCREF(__pyx_t_4);
23912  __Pyx_INCREF(__pyx_t_5);
23913  #else
23914  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
23915  __Pyx_GOTREF(__pyx_t_4);
23916  __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error)
23917  __Pyx_GOTREF(__pyx_t_5);
23918  #endif
23919  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23920  } else {
23921  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 407, __pyx_L1_error)
23922  }
23923  __pyx_v_have_slices = __pyx_t_4;
23924  __pyx_t_4 = 0;
23925  __pyx_v_indices = __pyx_t_5;
23926  __pyx_t_5 = 0;
23927 
23928  /* "View.MemoryView":410
23929  *
23930  * cdef char *itemp
23931  * if have_slices: # <<<<<<<<<<<<<<
23932  * return memview_slice(self, indices)
23933  * else:
23934  */
23935  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 410, __pyx_L1_error)
23936  if (__pyx_t_2) {
23937 
23938  /* "View.MemoryView":411
23939  * cdef char *itemp
23940  * if have_slices:
23941  * return memview_slice(self, indices) # <<<<<<<<<<<<<<
23942  * else:
23943  * itemp = self.get_item_pointer(indices)
23944  */
23945  __Pyx_XDECREF(__pyx_r);
23946  __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
23947  __Pyx_GOTREF(__pyx_t_3);
23948  __pyx_r = __pyx_t_3;
23949  __pyx_t_3 = 0;
23950  goto __pyx_L0;
23951 
23952  /* "View.MemoryView":410
23953  *
23954  * cdef char *itemp
23955  * if have_slices: # <<<<<<<<<<<<<<
23956  * return memview_slice(self, indices)
23957  * else:
23958  */
23959  }
23960 
23961  /* "View.MemoryView":413
23962  * return memview_slice(self, indices)
23963  * else:
23964  * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
23965  * return self.convert_item_to_object(itemp)
23966  *
23967  */
23968  /*else*/ {
23969  __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(0, 413, __pyx_L1_error)
23970  __pyx_v_itemp = __pyx_t_6;
23971 
23972  /* "View.MemoryView":414
23973  * else:
23974  * itemp = self.get_item_pointer(indices)
23975  * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
23976  *
23977  * def __setitem__(memoryview self, object index, object value):
23978  */
23979  __Pyx_XDECREF(__pyx_r);
23980  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
23981  __Pyx_GOTREF(__pyx_t_3);
23982  __pyx_r = __pyx_t_3;
23983  __pyx_t_3 = 0;
23984  goto __pyx_L0;
23985  }
23986 
23987  /* "View.MemoryView":403
23988  *
23989  *
23990  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
23991  * if index is Ellipsis:
23992  * return self
23993  */
23994 
23995  /* function exit code */
23996  __pyx_L1_error:;
23997  __Pyx_XDECREF(__pyx_t_3);
23998  __Pyx_XDECREF(__pyx_t_4);
23999  __Pyx_XDECREF(__pyx_t_5);
24000  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24001  __pyx_r = NULL;
24002  __pyx_L0:;
24003  __Pyx_XDECREF(__pyx_v_have_slices);
24004  __Pyx_XDECREF(__pyx_v_indices);
24005  __Pyx_XGIVEREF(__pyx_r);
24006  __Pyx_RefNannyFinishContext();
24007  return __pyx_r;
24008 }
24009 
24010 /* "View.MemoryView":416
24011  * return self.convert_item_to_object(itemp)
24012  *
24013  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
24014  * if self.view.readonly:
24015  * raise TypeError("Cannot assign to read-only memoryview")
24016  */
24017 
24018 /* Python wrapper */
24019 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
24020 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
24021  int __pyx_r;
24022  __Pyx_RefNannyDeclarations
24023  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
24024  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
24025 
24026  /* function exit code */
24027  __Pyx_RefNannyFinishContext();
24028  return __pyx_r;
24029 }
24030 
24031 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
24032  PyObject *__pyx_v_have_slices = NULL;
24033  PyObject *__pyx_v_obj = NULL;
24034  int __pyx_r;
24035  __Pyx_RefNannyDeclarations
24036  int __pyx_t_1;
24037  PyObject *__pyx_t_2 = NULL;
24038  PyObject *__pyx_t_3 = NULL;
24039  PyObject *__pyx_t_4 = NULL;
24040  __Pyx_RefNannySetupContext("__setitem__", 0);
24041  __Pyx_INCREF(__pyx_v_index);
24042 
24043  /* "View.MemoryView":417
24044  *
24045  * def __setitem__(memoryview self, object index, object value):
24046  * if self.view.readonly: # <<<<<<<<<<<<<<
24047  * raise TypeError("Cannot assign to read-only memoryview")
24048  *
24049  */
24050  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
24051  if (unlikely(__pyx_t_1)) {
24052 
24053  /* "View.MemoryView":418
24054  * def __setitem__(memoryview self, object index, object value):
24055  * if self.view.readonly:
24056  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
24057  *
24058  * have_slices, index = _unellipsify(index, self.view.ndim)
24059  */
24060  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
24061  __Pyx_GOTREF(__pyx_t_2);
24062  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
24063  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24064  __PYX_ERR(0, 418, __pyx_L1_error)
24065 
24066  /* "View.MemoryView":417
24067  *
24068  * def __setitem__(memoryview self, object index, object value):
24069  * if self.view.readonly: # <<<<<<<<<<<<<<
24070  * raise TypeError("Cannot assign to read-only memoryview")
24071  *
24072  */
24073  }
24074 
24075  /* "View.MemoryView":420
24076  * raise TypeError("Cannot assign to read-only memoryview")
24077  *
24078  * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
24079  *
24080  * if have_slices:
24081  */
24082  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
24083  __Pyx_GOTREF(__pyx_t_2);
24084  if (likely(__pyx_t_2 != Py_None)) {
24085  PyObject* sequence = __pyx_t_2;
24086  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
24087  if (unlikely(size != 2)) {
24088  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
24089  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
24090  __PYX_ERR(0, 420, __pyx_L1_error)
24091  }
24092  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24093  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
24094  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
24095  __Pyx_INCREF(__pyx_t_3);
24096  __Pyx_INCREF(__pyx_t_4);
24097  #else
24098  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
24099  __Pyx_GOTREF(__pyx_t_3);
24100  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
24101  __Pyx_GOTREF(__pyx_t_4);
24102  #endif
24103  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24104  } else {
24105  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 420, __pyx_L1_error)
24106  }
24107  __pyx_v_have_slices = __pyx_t_3;
24108  __pyx_t_3 = 0;
24109  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
24110  __pyx_t_4 = 0;
24111 
24112  /* "View.MemoryView":422
24113  * have_slices, index = _unellipsify(index, self.view.ndim)
24114  *
24115  * if have_slices: # <<<<<<<<<<<<<<
24116  * obj = self.is_slice(value)
24117  * if obj:
24118  */
24119  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
24120  if (__pyx_t_1) {
24121 
24122  /* "View.MemoryView":423
24123  *
24124  * if have_slices:
24125  * obj = self.is_slice(value) # <<<<<<<<<<<<<<
24126  * if obj:
24127  * self.setitem_slice_assignment(self[index], obj)
24128  */
24129  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
24130  __Pyx_GOTREF(__pyx_t_2);
24131  __pyx_v_obj = __pyx_t_2;
24132  __pyx_t_2 = 0;
24133 
24134  /* "View.MemoryView":424
24135  * if have_slices:
24136  * obj = self.is_slice(value)
24137  * if obj: # <<<<<<<<<<<<<<
24138  * self.setitem_slice_assignment(self[index], obj)
24139  * else:
24140  */
24141  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
24142  if (__pyx_t_1) {
24143 
24144  /* "View.MemoryView":425
24145  * obj = self.is_slice(value)
24146  * if obj:
24147  * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
24148  * else:
24149  * self.setitem_slice_assign_scalar(self[index], value)
24150  */
24151  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
24152  __Pyx_GOTREF(__pyx_t_2);
24153  __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
24154  __Pyx_GOTREF(__pyx_t_4);
24155  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24156  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24157 
24158  /* "View.MemoryView":424
24159  * if have_slices:
24160  * obj = self.is_slice(value)
24161  * if obj: # <<<<<<<<<<<<<<
24162  * self.setitem_slice_assignment(self[index], obj)
24163  * else:
24164  */
24165  goto __pyx_L5;
24166  }
24167 
24168  /* "View.MemoryView":427
24169  * self.setitem_slice_assignment(self[index], obj)
24170  * else:
24171  * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
24172  * else:
24173  * self.setitem_indexed(index, value)
24174  */
24175  /*else*/ {
24176  __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
24177  __Pyx_GOTREF(__pyx_t_4);
24178  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(0, 427, __pyx_L1_error)
24179  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
24180  __Pyx_GOTREF(__pyx_t_2);
24181  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24182  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24183  }
24184  __pyx_L5:;
24185 
24186  /* "View.MemoryView":422
24187  * have_slices, index = _unellipsify(index, self.view.ndim)
24188  *
24189  * if have_slices: # <<<<<<<<<<<<<<
24190  * obj = self.is_slice(value)
24191  * if obj:
24192  */
24193  goto __pyx_L4;
24194  }
24195 
24196  /* "View.MemoryView":429
24197  * self.setitem_slice_assign_scalar(self[index], value)
24198  * else:
24199  * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
24200  *
24201  * cdef is_slice(self, obj):
24202  */
24203  /*else*/ {
24204  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
24205  __Pyx_GOTREF(__pyx_t_2);
24206  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24207  }
24208  __pyx_L4:;
24209 
24210  /* "View.MemoryView":416
24211  * return self.convert_item_to_object(itemp)
24212  *
24213  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
24214  * if self.view.readonly:
24215  * raise TypeError("Cannot assign to read-only memoryview")
24216  */
24217 
24218  /* function exit code */
24219  __pyx_r = 0;
24220  goto __pyx_L0;
24221  __pyx_L1_error:;
24222  __Pyx_XDECREF(__pyx_t_2);
24223  __Pyx_XDECREF(__pyx_t_3);
24224  __Pyx_XDECREF(__pyx_t_4);
24225  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24226  __pyx_r = -1;
24227  __pyx_L0:;
24228  __Pyx_XDECREF(__pyx_v_have_slices);
24229  __Pyx_XDECREF(__pyx_v_obj);
24230  __Pyx_XDECREF(__pyx_v_index);
24231  __Pyx_RefNannyFinishContext();
24232  return __pyx_r;
24233 }
24234 
24235 /* "View.MemoryView":431
24236  * self.setitem_indexed(index, value)
24237  *
24238  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
24239  * if not isinstance(obj, memoryview):
24240  * try:
24241  */
24242 
24243 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
24244  PyObject *__pyx_r = NULL;
24245  __Pyx_RefNannyDeclarations
24246  int __pyx_t_1;
24247  int __pyx_t_2;
24248  PyObject *__pyx_t_3 = NULL;
24249  PyObject *__pyx_t_4 = NULL;
24250  PyObject *__pyx_t_5 = NULL;
24251  PyObject *__pyx_t_6 = NULL;
24252  PyObject *__pyx_t_7 = NULL;
24253  PyObject *__pyx_t_8 = NULL;
24254  int __pyx_t_9;
24255  __Pyx_RefNannySetupContext("is_slice", 0);
24256  __Pyx_INCREF(__pyx_v_obj);
24257 
24258  /* "View.MemoryView":432
24259  *
24260  * cdef is_slice(self, obj):
24261  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
24262  * try:
24263  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24264  */
24265  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
24266  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
24267  if (__pyx_t_2) {
24268 
24269  /* "View.MemoryView":433
24270  * cdef is_slice(self, obj):
24271  * if not isinstance(obj, memoryview):
24272  * try: # <<<<<<<<<<<<<<
24273  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24274  * self.dtype_is_object)
24275  */
24276  {
24277  __Pyx_PyThreadState_declare
24278  __Pyx_PyThreadState_assign
24279  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
24280  __Pyx_XGOTREF(__pyx_t_3);
24281  __Pyx_XGOTREF(__pyx_t_4);
24282  __Pyx_XGOTREF(__pyx_t_5);
24283  /*try:*/ {
24284 
24285  /* "View.MemoryView":434
24286  * if not isinstance(obj, memoryview):
24287  * try:
24288  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
24289  * self.dtype_is_object)
24290  * except TypeError:
24291  */
24292  __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L4_error)
24293  __Pyx_GOTREF(__pyx_t_6);
24294 
24295  /* "View.MemoryView":435
24296  * try:
24297  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24298  * self.dtype_is_object) # <<<<<<<<<<<<<<
24299  * except TypeError:
24300  * return None
24301  */
24302  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L4_error)
24303  __Pyx_GOTREF(__pyx_t_7);
24304 
24305  /* "View.MemoryView":434
24306  * if not isinstance(obj, memoryview):
24307  * try:
24308  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
24309  * self.dtype_is_object)
24310  * except TypeError:
24311  */
24312  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 434, __pyx_L4_error)
24313  __Pyx_GOTREF(__pyx_t_8);
24314  __Pyx_INCREF(__pyx_v_obj);
24315  __Pyx_GIVEREF(__pyx_v_obj);
24316  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
24317  __Pyx_GIVEREF(__pyx_t_6);
24318  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
24319  __Pyx_GIVEREF(__pyx_t_7);
24320  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
24321  __pyx_t_6 = 0;
24322  __pyx_t_7 = 0;
24323  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L4_error)
24324  __Pyx_GOTREF(__pyx_t_7);
24325  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
24326  __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
24327  __pyx_t_7 = 0;
24328 
24329  /* "View.MemoryView":433
24330  * cdef is_slice(self, obj):
24331  * if not isinstance(obj, memoryview):
24332  * try: # <<<<<<<<<<<<<<
24333  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24334  * self.dtype_is_object)
24335  */
24336  }
24337  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24338  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24339  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24340  goto __pyx_L9_try_end;
24341  __pyx_L4_error:;
24342  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24343  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24344  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
24345 
24346  /* "View.MemoryView":436
24347  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24348  * self.dtype_is_object)
24349  * except TypeError: # <<<<<<<<<<<<<<
24350  * return None
24351  *
24352  */
24353  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
24354  if (__pyx_t_9) {
24355  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24356  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 436, __pyx_L6_except_error)
24357  __Pyx_GOTREF(__pyx_t_7);
24358  __Pyx_GOTREF(__pyx_t_8);
24359  __Pyx_GOTREF(__pyx_t_6);
24360 
24361  /* "View.MemoryView":437
24362  * self.dtype_is_object)
24363  * except TypeError:
24364  * return None # <<<<<<<<<<<<<<
24365  *
24366  * return obj
24367  */
24368  __Pyx_XDECREF(__pyx_r);
24369  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24370  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24371  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24372  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
24373  goto __pyx_L7_except_return;
24374  }
24375  goto __pyx_L6_except_error;
24376  __pyx_L6_except_error:;
24377 
24378  /* "View.MemoryView":433
24379  * cdef is_slice(self, obj):
24380  * if not isinstance(obj, memoryview):
24381  * try: # <<<<<<<<<<<<<<
24382  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24383  * self.dtype_is_object)
24384  */
24385  __Pyx_XGIVEREF(__pyx_t_3);
24386  __Pyx_XGIVEREF(__pyx_t_4);
24387  __Pyx_XGIVEREF(__pyx_t_5);
24388  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
24389  goto __pyx_L1_error;
24390  __pyx_L7_except_return:;
24391  __Pyx_XGIVEREF(__pyx_t_3);
24392  __Pyx_XGIVEREF(__pyx_t_4);
24393  __Pyx_XGIVEREF(__pyx_t_5);
24394  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
24395  goto __pyx_L0;
24396  __pyx_L9_try_end:;
24397  }
24398 
24399  /* "View.MemoryView":432
24400  *
24401  * cdef is_slice(self, obj):
24402  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
24403  * try:
24404  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24405  */
24406  }
24407 
24408  /* "View.MemoryView":439
24409  * return None
24410  *
24411  * return obj # <<<<<<<<<<<<<<
24412  *
24413  * cdef setitem_slice_assignment(self, dst, src):
24414  */
24415  __Pyx_XDECREF(__pyx_r);
24416  __Pyx_INCREF(__pyx_v_obj);
24417  __pyx_r = __pyx_v_obj;
24418  goto __pyx_L0;
24419 
24420  /* "View.MemoryView":431
24421  * self.setitem_indexed(index, value)
24422  *
24423  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
24424  * if not isinstance(obj, memoryview):
24425  * try:
24426  */
24427 
24428  /* function exit code */
24429  __pyx_L1_error:;
24430  __Pyx_XDECREF(__pyx_t_6);
24431  __Pyx_XDECREF(__pyx_t_7);
24432  __Pyx_XDECREF(__pyx_t_8);
24433  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24434  __pyx_r = 0;
24435  __pyx_L0:;
24436  __Pyx_XDECREF(__pyx_v_obj);
24437  __Pyx_XGIVEREF(__pyx_r);
24438  __Pyx_RefNannyFinishContext();
24439  return __pyx_r;
24440 }
24441 
24442 /* "View.MemoryView":441
24443  * return obj
24444  *
24445  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
24446  * cdef __Pyx_memviewslice dst_slice
24447  * cdef __Pyx_memviewslice src_slice
24448  */
24449 
24450 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
24451  __Pyx_memviewslice __pyx_v_dst_slice;
24452  __Pyx_memviewslice __pyx_v_src_slice;
24453  PyObject *__pyx_r = NULL;
24454  __Pyx_RefNannyDeclarations
24455  __Pyx_memviewslice *__pyx_t_1;
24456  __Pyx_memviewslice *__pyx_t_2;
24457  PyObject *__pyx_t_3 = NULL;
24458  int __pyx_t_4;
24459  int __pyx_t_5;
24460  int __pyx_t_6;
24461  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
24462 
24463  /* "View.MemoryView":445
24464  * cdef __Pyx_memviewslice src_slice
24465  *
24466  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
24467  * get_slice_from_memview(dst, &dst_slice)[0],
24468  * src.ndim, dst.ndim, self.dtype_is_object)
24469  */
24470  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(0, 445, __pyx_L1_error)
24471  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 445, __pyx_L1_error)
24472 
24473  /* "View.MemoryView":446
24474  *
24475  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
24476  * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
24477  * src.ndim, dst.ndim, self.dtype_is_object)
24478  *
24479  */
24480  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(0, 446, __pyx_L1_error)
24481  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 446, __pyx_L1_error)
24482 
24483  /* "View.MemoryView":447
24484  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
24485  * get_slice_from_memview(dst, &dst_slice)[0],
24486  * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
24487  *
24488  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
24489  */
24490  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
24491  __Pyx_GOTREF(__pyx_t_3);
24492  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
24493  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24494  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
24495  __Pyx_GOTREF(__pyx_t_3);
24496  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
24497  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24498 
24499  /* "View.MemoryView":445
24500  * cdef __Pyx_memviewslice src_slice
24501  *
24502  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
24503  * get_slice_from_memview(dst, &dst_slice)[0],
24504  * src.ndim, dst.ndim, self.dtype_is_object)
24505  */
24506  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 445, __pyx_L1_error)
24507 
24508  /* "View.MemoryView":441
24509  * return obj
24510  *
24511  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
24512  * cdef __Pyx_memviewslice dst_slice
24513  * cdef __Pyx_memviewslice src_slice
24514  */
24515 
24516  /* function exit code */
24517  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24518  goto __pyx_L0;
24519  __pyx_L1_error:;
24520  __Pyx_XDECREF(__pyx_t_3);
24521  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
24522  __pyx_r = 0;
24523  __pyx_L0:;
24524  __Pyx_XGIVEREF(__pyx_r);
24525  __Pyx_RefNannyFinishContext();
24526  return __pyx_r;
24527 }
24528 
24529 /* "View.MemoryView":449
24530  * src.ndim, dst.ndim, self.dtype_is_object)
24531  *
24532  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
24533  * cdef int array[128]
24534  * cdef void *tmp = NULL
24535  */
24536 
24537 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
24538  int __pyx_v_array[0x80];
24539  void *__pyx_v_tmp;
24540  void *__pyx_v_item;
24541  __Pyx_memviewslice *__pyx_v_dst_slice;
24542  __Pyx_memviewslice __pyx_v_tmp_slice;
24543  PyObject *__pyx_r = NULL;
24544  __Pyx_RefNannyDeclarations
24545  __Pyx_memviewslice *__pyx_t_1;
24546  int __pyx_t_2;
24547  PyObject *__pyx_t_3 = NULL;
24548  int __pyx_t_4;
24549  int __pyx_t_5;
24550  char const *__pyx_t_6;
24551  PyObject *__pyx_t_7 = NULL;
24552  PyObject *__pyx_t_8 = NULL;
24553  PyObject *__pyx_t_9 = NULL;
24554  PyObject *__pyx_t_10 = NULL;
24555  PyObject *__pyx_t_11 = NULL;
24556  PyObject *__pyx_t_12 = NULL;
24557  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
24558 
24559  /* "View.MemoryView":451
24560  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
24561  * cdef int array[128]
24562  * cdef void *tmp = NULL # <<<<<<<<<<<<<<
24563  * cdef void *item
24564  *
24565  */
24566  __pyx_v_tmp = NULL;
24567 
24568  /* "View.MemoryView":456
24569  * cdef __Pyx_memviewslice *dst_slice
24570  * cdef __Pyx_memviewslice tmp_slice
24571  * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
24572  *
24573  * if <size_t>self.view.itemsize > sizeof(array):
24574  */
24575  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 456, __pyx_L1_error)
24576  __pyx_v_dst_slice = __pyx_t_1;
24577 
24578  /* "View.MemoryView":458
24579  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
24580  *
24581  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
24582  * tmp = PyMem_Malloc(self.view.itemsize)
24583  * if tmp == NULL:
24584  */
24585  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
24586  if (__pyx_t_2) {
24587 
24588  /* "View.MemoryView":459
24589  *
24590  * if <size_t>self.view.itemsize > sizeof(array):
24591  * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
24592  * if tmp == NULL:
24593  * raise MemoryError
24594  */
24595  __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
24596 
24597  /* "View.MemoryView":460
24598  * if <size_t>self.view.itemsize > sizeof(array):
24599  * tmp = PyMem_Malloc(self.view.itemsize)
24600  * if tmp == NULL: # <<<<<<<<<<<<<<
24601  * raise MemoryError
24602  * item = tmp
24603  */
24604  __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
24605  if (unlikely(__pyx_t_2)) {
24606 
24607  /* "View.MemoryView":461
24608  * tmp = PyMem_Malloc(self.view.itemsize)
24609  * if tmp == NULL:
24610  * raise MemoryError # <<<<<<<<<<<<<<
24611  * item = tmp
24612  * else:
24613  */
24614  PyErr_NoMemory(); __PYX_ERR(0, 461, __pyx_L1_error)
24615 
24616  /* "View.MemoryView":460
24617  * if <size_t>self.view.itemsize > sizeof(array):
24618  * tmp = PyMem_Malloc(self.view.itemsize)
24619  * if tmp == NULL: # <<<<<<<<<<<<<<
24620  * raise MemoryError
24621  * item = tmp
24622  */
24623  }
24624 
24625  /* "View.MemoryView":462
24626  * if tmp == NULL:
24627  * raise MemoryError
24628  * item = tmp # <<<<<<<<<<<<<<
24629  * else:
24630  * item = <void *> array
24631  */
24632  __pyx_v_item = __pyx_v_tmp;
24633 
24634  /* "View.MemoryView":458
24635  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
24636  *
24637  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
24638  * tmp = PyMem_Malloc(self.view.itemsize)
24639  * if tmp == NULL:
24640  */
24641  goto __pyx_L3;
24642  }
24643 
24644  /* "View.MemoryView":464
24645  * item = tmp
24646  * else:
24647  * item = <void *> array # <<<<<<<<<<<<<<
24648  *
24649  * try:
24650  */
24651  /*else*/ {
24652  __pyx_v_item = ((void *)__pyx_v_array);
24653  }
24654  __pyx_L3:;
24655 
24656  /* "View.MemoryView":466
24657  * item = <void *> array
24658  *
24659  * try: # <<<<<<<<<<<<<<
24660  * if self.dtype_is_object:
24661  * (<PyObject **> item)[0] = <PyObject *> value
24662  */
24663  /*try:*/ {
24664 
24665  /* "View.MemoryView":467
24666  *
24667  * try:
24668  * if self.dtype_is_object: # <<<<<<<<<<<<<<
24669  * (<PyObject **> item)[0] = <PyObject *> value
24670  * else:
24671  */
24672  __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
24673  if (__pyx_t_2) {
24674 
24675  /* "View.MemoryView":468
24676  * try:
24677  * if self.dtype_is_object:
24678  * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
24679  * else:
24680  * self.assign_item_from_object(<char *> item, value)
24681  */
24682  (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
24683 
24684  /* "View.MemoryView":467
24685  *
24686  * try:
24687  * if self.dtype_is_object: # <<<<<<<<<<<<<<
24688  * (<PyObject **> item)[0] = <PyObject *> value
24689  * else:
24690  */
24691  goto __pyx_L8;
24692  }
24693 
24694  /* "View.MemoryView":470
24695  * (<PyObject **> item)[0] = <PyObject *> value
24696  * else:
24697  * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
24698  *
24699  *
24700  */
24701  /*else*/ {
24702  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L6_error)
24703  __Pyx_GOTREF(__pyx_t_3);
24704  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24705  }
24706  __pyx_L8:;
24707 
24708  /* "View.MemoryView":474
24709  *
24710  *
24711  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
24712  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24713  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24714  */
24715  __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
24716  if (__pyx_t_2) {
24717 
24718  /* "View.MemoryView":475
24719  *
24720  * if self.view.suboffsets != NULL:
24721  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
24722  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24723  * item, self.dtype_is_object)
24724  */
24725  __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L6_error)
24726  __Pyx_GOTREF(__pyx_t_3);
24727  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24728 
24729  /* "View.MemoryView":474
24730  *
24731  *
24732  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
24733  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24734  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24735  */
24736  }
24737 
24738  /* "View.MemoryView":476
24739  * if self.view.suboffsets != NULL:
24740  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24741  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
24742  * item, self.dtype_is_object)
24743  * finally:
24744  */
24745  __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
24746  }
24747 
24748  /* "View.MemoryView":479
24749  * item, self.dtype_is_object)
24750  * finally:
24751  * PyMem_Free(tmp) # <<<<<<<<<<<<<<
24752  *
24753  * cdef setitem_indexed(self, index, value):
24754  */
24755  /*finally:*/ {
24756  /*normal exit:*/{
24757  PyMem_Free(__pyx_v_tmp);
24758  goto __pyx_L7;
24759  }
24760  __pyx_L6_error:;
24761  /*exception exit:*/{
24762  __Pyx_PyThreadState_declare
24763  __Pyx_PyThreadState_assign
24764  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
24765  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24766  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
24767  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
24768  __Pyx_XGOTREF(__pyx_t_7);
24769  __Pyx_XGOTREF(__pyx_t_8);
24770  __Pyx_XGOTREF(__pyx_t_9);
24771  __Pyx_XGOTREF(__pyx_t_10);
24772  __Pyx_XGOTREF(__pyx_t_11);
24773  __Pyx_XGOTREF(__pyx_t_12);
24774  __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
24775  {
24776  PyMem_Free(__pyx_v_tmp);
24777  }
24778  if (PY_MAJOR_VERSION >= 3) {
24779  __Pyx_XGIVEREF(__pyx_t_10);
24780  __Pyx_XGIVEREF(__pyx_t_11);
24781  __Pyx_XGIVEREF(__pyx_t_12);
24782  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
24783  }
24784  __Pyx_XGIVEREF(__pyx_t_7);
24785  __Pyx_XGIVEREF(__pyx_t_8);
24786  __Pyx_XGIVEREF(__pyx_t_9);
24787  __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24788  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
24789  __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
24790  goto __pyx_L1_error;
24791  }
24792  __pyx_L7:;
24793  }
24794 
24795  /* "View.MemoryView":449
24796  * src.ndim, dst.ndim, self.dtype_is_object)
24797  *
24798  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
24799  * cdef int array[128]
24800  * cdef void *tmp = NULL
24801  */
24802 
24803  /* function exit code */
24804  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24805  goto __pyx_L0;
24806  __pyx_L1_error:;
24807  __Pyx_XDECREF(__pyx_t_3);
24808  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
24809  __pyx_r = 0;
24810  __pyx_L0:;
24811  __Pyx_XGIVEREF(__pyx_r);
24812  __Pyx_RefNannyFinishContext();
24813  return __pyx_r;
24814 }
24815 
24816 /* "View.MemoryView":481
24817  * PyMem_Free(tmp)
24818  *
24819  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
24820  * cdef char *itemp = self.get_item_pointer(index)
24821  * self.assign_item_from_object(itemp, value)
24822  */
24823 
24824 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
24825  char *__pyx_v_itemp;
24826  PyObject *__pyx_r = NULL;
24827  __Pyx_RefNannyDeclarations
24828  char *__pyx_t_1;
24829  PyObject *__pyx_t_2 = NULL;
24830  __Pyx_RefNannySetupContext("setitem_indexed", 0);
24831 
24832  /* "View.MemoryView":482
24833  *
24834  * cdef setitem_indexed(self, index, value):
24835  * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
24836  * self.assign_item_from_object(itemp, value)
24837  *
24838  */
24839  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 482, __pyx_L1_error)
24840  __pyx_v_itemp = __pyx_t_1;
24841 
24842  /* "View.MemoryView":483
24843  * cdef setitem_indexed(self, index, value):
24844  * cdef char *itemp = self.get_item_pointer(index)
24845  * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
24846  *
24847  * cdef convert_item_to_object(self, char *itemp):
24848  */
24849  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
24850  __Pyx_GOTREF(__pyx_t_2);
24851  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24852 
24853  /* "View.MemoryView":481
24854  * PyMem_Free(tmp)
24855  *
24856  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
24857  * cdef char *itemp = self.get_item_pointer(index)
24858  * self.assign_item_from_object(itemp, value)
24859  */
24860 
24861  /* function exit code */
24862  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24863  goto __pyx_L0;
24864  __pyx_L1_error:;
24865  __Pyx_XDECREF(__pyx_t_2);
24866  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
24867  __pyx_r = 0;
24868  __pyx_L0:;
24869  __Pyx_XGIVEREF(__pyx_r);
24870  __Pyx_RefNannyFinishContext();
24871  return __pyx_r;
24872 }
24873 
24874 /* "View.MemoryView":485
24875  * self.assign_item_from_object(itemp, value)
24876  *
24877  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
24878  * """Only used if instantiated manually by the user, or if Cython doesn't
24879  * know how to convert the type"""
24880  */
24881 
24882 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
24883  PyObject *__pyx_v_struct = NULL;
24884  PyObject *__pyx_v_bytesitem = 0;
24885  PyObject *__pyx_v_result = NULL;
24886  PyObject *__pyx_r = NULL;
24887  __Pyx_RefNannyDeclarations
24888  PyObject *__pyx_t_1 = NULL;
24889  PyObject *__pyx_t_2 = NULL;
24890  PyObject *__pyx_t_3 = NULL;
24891  PyObject *__pyx_t_4 = NULL;
24892  PyObject *__pyx_t_5 = NULL;
24893  PyObject *__pyx_t_6 = NULL;
24894  PyObject *__pyx_t_7 = NULL;
24895  int __pyx_t_8;
24896  PyObject *__pyx_t_9 = NULL;
24897  size_t __pyx_t_10;
24898  int __pyx_t_11;
24899  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
24900 
24901  /* "View.MemoryView":488
24902  * """Only used if instantiated manually by the user, or if Cython doesn't
24903  * know how to convert the type"""
24904  * import struct # <<<<<<<<<<<<<<
24905  * cdef bytes bytesitem
24906  *
24907  */
24908  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
24909  __Pyx_GOTREF(__pyx_t_1);
24910  __pyx_v_struct = __pyx_t_1;
24911  __pyx_t_1 = 0;
24912 
24913  /* "View.MemoryView":491
24914  * cdef bytes bytesitem
24915  *
24916  * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
24917  * try:
24918  * result = struct.unpack(self.view.format, bytesitem)
24919  */
24920  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
24921  __Pyx_GOTREF(__pyx_t_1);
24922  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
24923  __pyx_t_1 = 0;
24924 
24925  /* "View.MemoryView":492
24926  *
24927  * bytesitem = itemp[:self.view.itemsize]
24928  * try: # <<<<<<<<<<<<<<
24929  * result = struct.unpack(self.view.format, bytesitem)
24930  * except struct.error:
24931  */
24932  {
24933  __Pyx_PyThreadState_declare
24934  __Pyx_PyThreadState_assign
24935  __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
24936  __Pyx_XGOTREF(__pyx_t_2);
24937  __Pyx_XGOTREF(__pyx_t_3);
24938  __Pyx_XGOTREF(__pyx_t_4);
24939  /*try:*/ {
24940 
24941  /* "View.MemoryView":493
24942  * bytesitem = itemp[:self.view.itemsize]
24943  * try:
24944  * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
24945  * except struct.error:
24946  * raise ValueError("Unable to convert item to object")
24947  */
24948  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L3_error)
24949  __Pyx_GOTREF(__pyx_t_5);
24950  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L3_error)
24951  __Pyx_GOTREF(__pyx_t_6);
24952  __pyx_t_7 = NULL;
24953  __pyx_t_8 = 0;
24954  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24955  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
24956  if (likely(__pyx_t_7)) {
24957  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24958  __Pyx_INCREF(__pyx_t_7);
24959  __Pyx_INCREF(function);
24960  __Pyx_DECREF_SET(__pyx_t_5, function);
24961  __pyx_t_8 = 1;
24962  }
24963  }
24964  #if CYTHON_FAST_PYCALL
24965  if (PyFunction_Check(__pyx_t_5)) {
24966  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
24967  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
24968  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24969  __Pyx_GOTREF(__pyx_t_1);
24970  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24971  } else
24972  #endif
24973  #if CYTHON_FAST_PYCCALL
24974  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
24975  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
24976  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
24977  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24978  __Pyx_GOTREF(__pyx_t_1);
24979  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24980  } else
24981  #endif
24982  {
24983  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 493, __pyx_L3_error)
24984  __Pyx_GOTREF(__pyx_t_9);
24985  if (__pyx_t_7) {
24986  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
24987  }
24988  __Pyx_GIVEREF(__pyx_t_6);
24989  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
24990  __Pyx_INCREF(__pyx_v_bytesitem);
24991  __Pyx_GIVEREF(__pyx_v_bytesitem);
24992  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
24993  __pyx_t_6 = 0;
24994  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
24995  __Pyx_GOTREF(__pyx_t_1);
24996  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
24997  }
24998  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24999  __pyx_v_result = __pyx_t_1;
25000  __pyx_t_1 = 0;
25001 
25002  /* "View.MemoryView":492
25003  *
25004  * bytesitem = itemp[:self.view.itemsize]
25005  * try: # <<<<<<<<<<<<<<
25006  * result = struct.unpack(self.view.format, bytesitem)
25007  * except struct.error:
25008  */
25009  }
25010 
25011  /* "View.MemoryView":497
25012  * raise ValueError("Unable to convert item to object")
25013  * else:
25014  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
25015  * return result[0]
25016  * return result
25017  */
25018  /*else:*/ {
25019  __pyx_t_10 = strlen(__pyx_v_self->view.format);
25020  __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
25021  if (__pyx_t_11) {
25022 
25023  /* "View.MemoryView":498
25024  * else:
25025  * if len(self.view.format) == 1:
25026  * return result[0] # <<<<<<<<<<<<<<
25027  * return result
25028  *
25029  */
25030  __Pyx_XDECREF(__pyx_r);
25031  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L5_except_error)
25032  __Pyx_GOTREF(__pyx_t_1);
25033  __pyx_r = __pyx_t_1;
25034  __pyx_t_1 = 0;
25035  goto __pyx_L6_except_return;
25036 
25037  /* "View.MemoryView":497
25038  * raise ValueError("Unable to convert item to object")
25039  * else:
25040  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
25041  * return result[0]
25042  * return result
25043  */
25044  }
25045 
25046  /* "View.MemoryView":499
25047  * if len(self.view.format) == 1:
25048  * return result[0]
25049  * return result # <<<<<<<<<<<<<<
25050  *
25051  * cdef assign_item_from_object(self, char *itemp, object value):
25052  */
25053  __Pyx_XDECREF(__pyx_r);
25054  __Pyx_INCREF(__pyx_v_result);
25055  __pyx_r = __pyx_v_result;
25056  goto __pyx_L6_except_return;
25057  }
25058  __pyx_L3_error:;
25059  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25060  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25061  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
25062  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
25063  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
25064 
25065  /* "View.MemoryView":494
25066  * try:
25067  * result = struct.unpack(self.view.format, bytesitem)
25068  * except struct.error: # <<<<<<<<<<<<<<
25069  * raise ValueError("Unable to convert item to object")
25070  * else:
25071  */
25072  __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
25073  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L5_except_error)
25074  __Pyx_GOTREF(__pyx_t_6);
25075  __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
25076  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25077  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
25078  __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
25079  if (__pyx_t_8) {
25080  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
25081  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 494, __pyx_L5_except_error)
25082  __Pyx_GOTREF(__pyx_t_9);
25083  __Pyx_GOTREF(__pyx_t_5);
25084  __Pyx_GOTREF(__pyx_t_1);
25085 
25086  /* "View.MemoryView":495
25087  * result = struct.unpack(self.view.format, bytesitem)
25088  * except struct.error:
25089  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
25090  * else:
25091  * if len(self.view.format) == 1:
25092  */
25093  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L5_except_error)
25094  __Pyx_GOTREF(__pyx_t_6);
25095  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
25096  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25097  __PYX_ERR(0, 495, __pyx_L5_except_error)
25098  }
25099  goto __pyx_L5_except_error;
25100  __pyx_L5_except_error:;
25101 
25102  /* "View.MemoryView":492
25103  *
25104  * bytesitem = itemp[:self.view.itemsize]
25105  * try: # <<<<<<<<<<<<<<
25106  * result = struct.unpack(self.view.format, bytesitem)
25107  * except struct.error:
25108  */
25109  __Pyx_XGIVEREF(__pyx_t_2);
25110  __Pyx_XGIVEREF(__pyx_t_3);
25111  __Pyx_XGIVEREF(__pyx_t_4);
25112  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
25113  goto __pyx_L1_error;
25114  __pyx_L6_except_return:;
25115  __Pyx_XGIVEREF(__pyx_t_2);
25116  __Pyx_XGIVEREF(__pyx_t_3);
25117  __Pyx_XGIVEREF(__pyx_t_4);
25118  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
25119  goto __pyx_L0;
25120  }
25121 
25122  /* "View.MemoryView":485
25123  * self.assign_item_from_object(itemp, value)
25124  *
25125  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
25126  * """Only used if instantiated manually by the user, or if Cython doesn't
25127  * know how to convert the type"""
25128  */
25129 
25130  /* function exit code */
25131  __pyx_L1_error:;
25132  __Pyx_XDECREF(__pyx_t_1);
25133  __Pyx_XDECREF(__pyx_t_5);
25134  __Pyx_XDECREF(__pyx_t_6);
25135  __Pyx_XDECREF(__pyx_t_7);
25136  __Pyx_XDECREF(__pyx_t_9);
25137  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
25138  __pyx_r = 0;
25139  __pyx_L0:;
25140  __Pyx_XDECREF(__pyx_v_struct);
25141  __Pyx_XDECREF(__pyx_v_bytesitem);
25142  __Pyx_XDECREF(__pyx_v_result);
25143  __Pyx_XGIVEREF(__pyx_r);
25144  __Pyx_RefNannyFinishContext();
25145  return __pyx_r;
25146 }
25147 
25148 /* "View.MemoryView":501
25149  * return result
25150  *
25151  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
25152  * """Only used if instantiated manually by the user, or if Cython doesn't
25153  * know how to convert the type"""
25154  */
25155 
25156 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
25157  PyObject *__pyx_v_struct = NULL;
25158  char __pyx_v_c;
25159  PyObject *__pyx_v_bytesvalue = 0;
25160  Py_ssize_t __pyx_v_i;
25161  PyObject *__pyx_r = NULL;
25162  __Pyx_RefNannyDeclarations
25163  PyObject *__pyx_t_1 = NULL;
25164  int __pyx_t_2;
25165  int __pyx_t_3;
25166  PyObject *__pyx_t_4 = NULL;
25167  PyObject *__pyx_t_5 = NULL;
25168  PyObject *__pyx_t_6 = NULL;
25169  int __pyx_t_7;
25170  PyObject *__pyx_t_8 = NULL;
25171  Py_ssize_t __pyx_t_9;
25172  PyObject *__pyx_t_10 = NULL;
25173  char *__pyx_t_11;
25174  char *__pyx_t_12;
25175  char *__pyx_t_13;
25176  char *__pyx_t_14;
25177  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
25178 
25179  /* "View.MemoryView":504
25180  * """Only used if instantiated manually by the user, or if Cython doesn't
25181  * know how to convert the type"""
25182  * import struct # <<<<<<<<<<<<<<
25183  * cdef char c
25184  * cdef bytes bytesvalue
25185  */
25186  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
25187  __Pyx_GOTREF(__pyx_t_1);
25188  __pyx_v_struct = __pyx_t_1;
25189  __pyx_t_1 = 0;
25190 
25191  /* "View.MemoryView":509
25192  * cdef Py_ssize_t i
25193  *
25194  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
25195  * bytesvalue = struct.pack(self.view.format, *value)
25196  * else:
25197  */
25198  __pyx_t_2 = PyTuple_Check(__pyx_v_value);
25199  __pyx_t_3 = (__pyx_t_2 != 0);
25200  if (__pyx_t_3) {
25201 
25202  /* "View.MemoryView":510
25203  *
25204  * if isinstance(value, tuple):
25205  * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
25206  * else:
25207  * bytesvalue = struct.pack(self.view.format, value)
25208  */
25209  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
25210  __Pyx_GOTREF(__pyx_t_1);
25211  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
25212  __Pyx_GOTREF(__pyx_t_4);
25213  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error)
25214  __Pyx_GOTREF(__pyx_t_5);
25215  __Pyx_GIVEREF(__pyx_t_4);
25216  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
25217  __pyx_t_4 = 0;
25218  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
25219  __Pyx_GOTREF(__pyx_t_4);
25220  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error)
25221  __Pyx_GOTREF(__pyx_t_6);
25222  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25223  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25224  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
25225  __Pyx_GOTREF(__pyx_t_4);
25226  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25227  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25228  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 510, __pyx_L1_error)
25229  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
25230  __pyx_t_4 = 0;
25231 
25232  /* "View.MemoryView":509
25233  * cdef Py_ssize_t i
25234  *
25235  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
25236  * bytesvalue = struct.pack(self.view.format, *value)
25237  * else:
25238  */
25239  goto __pyx_L3;
25240  }
25241 
25242  /* "View.MemoryView":512
25243  * bytesvalue = struct.pack(self.view.format, *value)
25244  * else:
25245  * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
25246  *
25247  * for i, c in enumerate(bytesvalue):
25248  */
25249  /*else*/ {
25250  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
25251  __Pyx_GOTREF(__pyx_t_6);
25252  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
25253  __Pyx_GOTREF(__pyx_t_1);
25254  __pyx_t_5 = NULL;
25255  __pyx_t_7 = 0;
25256  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
25257  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
25258  if (likely(__pyx_t_5)) {
25259  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
25260  __Pyx_INCREF(__pyx_t_5);
25261  __Pyx_INCREF(function);
25262  __Pyx_DECREF_SET(__pyx_t_6, function);
25263  __pyx_t_7 = 1;
25264  }
25265  }
25266  #if CYTHON_FAST_PYCALL
25267  if (PyFunction_Check(__pyx_t_6)) {
25268  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
25269  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
25270  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25271  __Pyx_GOTREF(__pyx_t_4);
25272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25273  } else
25274  #endif
25275  #if CYTHON_FAST_PYCCALL
25276  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
25277  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
25278  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
25279  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25280  __Pyx_GOTREF(__pyx_t_4);
25281  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25282  } else
25283  #endif
25284  {
25285  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 512, __pyx_L1_error)
25286  __Pyx_GOTREF(__pyx_t_8);
25287  if (__pyx_t_5) {
25288  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
25289  }
25290  __Pyx_GIVEREF(__pyx_t_1);
25291  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
25292  __Pyx_INCREF(__pyx_v_value);
25293  __Pyx_GIVEREF(__pyx_v_value);
25294  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
25295  __pyx_t_1 = 0;
25296  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
25297  __Pyx_GOTREF(__pyx_t_4);
25298  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
25299  }
25300  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25301  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 512, __pyx_L1_error)
25302  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
25303  __pyx_t_4 = 0;
25304  }
25305  __pyx_L3:;
25306 
25307  /* "View.MemoryView":514
25308  * bytesvalue = struct.pack(self.view.format, value)
25309  *
25310  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
25311  * itemp[i] = c
25312  *
25313  */
25314  __pyx_t_9 = 0;
25315  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
25316  PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
25317  __PYX_ERR(0, 514, __pyx_L1_error)
25318  }
25319  __Pyx_INCREF(__pyx_v_bytesvalue);
25320  __pyx_t_10 = __pyx_v_bytesvalue;
25321  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
25322  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
25323  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
25324  __pyx_t_11 = __pyx_t_14;
25325  __pyx_v_c = (__pyx_t_11[0]);
25326 
25327  /* "View.MemoryView":515
25328  *
25329  * for i, c in enumerate(bytesvalue):
25330  * itemp[i] = c # <<<<<<<<<<<<<<
25331  *
25332  * @cname('getbuffer')
25333  */
25334  __pyx_v_i = __pyx_t_9;
25335 
25336  /* "View.MemoryView":514
25337  * bytesvalue = struct.pack(self.view.format, value)
25338  *
25339  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
25340  * itemp[i] = c
25341  *
25342  */
25343  __pyx_t_9 = (__pyx_t_9 + 1);
25344 
25345  /* "View.MemoryView":515
25346  *
25347  * for i, c in enumerate(bytesvalue):
25348  * itemp[i] = c # <<<<<<<<<<<<<<
25349  *
25350  * @cname('getbuffer')
25351  */
25352  (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
25353  }
25354  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25355 
25356  /* "View.MemoryView":501
25357  * return result
25358  *
25359  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
25360  * """Only used if instantiated manually by the user, or if Cython doesn't
25361  * know how to convert the type"""
25362  */
25363 
25364  /* function exit code */
25365  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25366  goto __pyx_L0;
25367  __pyx_L1_error:;
25368  __Pyx_XDECREF(__pyx_t_1);
25369  __Pyx_XDECREF(__pyx_t_4);
25370  __Pyx_XDECREF(__pyx_t_5);
25371  __Pyx_XDECREF(__pyx_t_6);
25372  __Pyx_XDECREF(__pyx_t_8);
25373  __Pyx_XDECREF(__pyx_t_10);
25374  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
25375  __pyx_r = 0;
25376  __pyx_L0:;
25377  __Pyx_XDECREF(__pyx_v_struct);
25378  __Pyx_XDECREF(__pyx_v_bytesvalue);
25379  __Pyx_XGIVEREF(__pyx_r);
25380  __Pyx_RefNannyFinishContext();
25381  return __pyx_r;
25382 }
25383 
25384 /* "View.MemoryView":518
25385  *
25386  * @cname('getbuffer')
25387  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
25388  * if flags & PyBUF_WRITABLE and self.view.readonly:
25389  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25390  */
25391 
25392 /* Python wrapper */
25393 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
25394 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25395  int __pyx_r;
25396  __Pyx_RefNannyDeclarations
25397  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
25398  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
25399 
25400  /* function exit code */
25401  __Pyx_RefNannyFinishContext();
25402  return __pyx_r;
25403 }
25404 
25405 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25406  int __pyx_r;
25407  __Pyx_RefNannyDeclarations
25408  int __pyx_t_1;
25409  int __pyx_t_2;
25410  PyObject *__pyx_t_3 = NULL;
25411  Py_ssize_t *__pyx_t_4;
25412  char *__pyx_t_5;
25413  void *__pyx_t_6;
25414  int __pyx_t_7;
25415  Py_ssize_t __pyx_t_8;
25416  if (__pyx_v_info == NULL) {
25417  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
25418  return -1;
25419  }
25420  __Pyx_RefNannySetupContext("__getbuffer__", 0);
25421  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
25422  __Pyx_GIVEREF(__pyx_v_info->obj);
25423 
25424  /* "View.MemoryView":519
25425  * @cname('getbuffer')
25426  * def __getbuffer__(self, Py_buffer *info, int flags):
25427  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
25428  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25429  *
25430  */
25431  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
25432  if (__pyx_t_2) {
25433  } else {
25434  __pyx_t_1 = __pyx_t_2;
25435  goto __pyx_L4_bool_binop_done;
25436  }
25437  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
25438  __pyx_t_1 = __pyx_t_2;
25439  __pyx_L4_bool_binop_done:;
25440  if (unlikely(__pyx_t_1)) {
25441 
25442  /* "View.MemoryView":520
25443  * def __getbuffer__(self, Py_buffer *info, int flags):
25444  * if flags & PyBUF_WRITABLE and self.view.readonly:
25445  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
25446  *
25447  * if flags & PyBUF_ND:
25448  */
25449  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
25450  __Pyx_GOTREF(__pyx_t_3);
25451  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25452  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25453  __PYX_ERR(0, 520, __pyx_L1_error)
25454 
25455  /* "View.MemoryView":519
25456  * @cname('getbuffer')
25457  * def __getbuffer__(self, Py_buffer *info, int flags):
25458  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
25459  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25460  *
25461  */
25462  }
25463 
25464  /* "View.MemoryView":522
25465  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25466  *
25467  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
25468  * info.shape = self.view.shape
25469  * else:
25470  */
25471  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
25472  if (__pyx_t_1) {
25473 
25474  /* "View.MemoryView":523
25475  *
25476  * if flags & PyBUF_ND:
25477  * info.shape = self.view.shape # <<<<<<<<<<<<<<
25478  * else:
25479  * info.shape = NULL
25480  */
25481  __pyx_t_4 = __pyx_v_self->view.shape;
25482  __pyx_v_info->shape = __pyx_t_4;
25483 
25484  /* "View.MemoryView":522
25485  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25486  *
25487  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
25488  * info.shape = self.view.shape
25489  * else:
25490  */
25491  goto __pyx_L6;
25492  }
25493 
25494  /* "View.MemoryView":525
25495  * info.shape = self.view.shape
25496  * else:
25497  * info.shape = NULL # <<<<<<<<<<<<<<
25498  *
25499  * if flags & PyBUF_STRIDES:
25500  */
25501  /*else*/ {
25502  __pyx_v_info->shape = NULL;
25503  }
25504  __pyx_L6:;
25505 
25506  /* "View.MemoryView":527
25507  * info.shape = NULL
25508  *
25509  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
25510  * info.strides = self.view.strides
25511  * else:
25512  */
25513  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
25514  if (__pyx_t_1) {
25515 
25516  /* "View.MemoryView":528
25517  *
25518  * if flags & PyBUF_STRIDES:
25519  * info.strides = self.view.strides # <<<<<<<<<<<<<<
25520  * else:
25521  * info.strides = NULL
25522  */
25523  __pyx_t_4 = __pyx_v_self->view.strides;
25524  __pyx_v_info->strides = __pyx_t_4;
25525 
25526  /* "View.MemoryView":527
25527  * info.shape = NULL
25528  *
25529  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
25530  * info.strides = self.view.strides
25531  * else:
25532  */
25533  goto __pyx_L7;
25534  }
25535 
25536  /* "View.MemoryView":530
25537  * info.strides = self.view.strides
25538  * else:
25539  * info.strides = NULL # <<<<<<<<<<<<<<
25540  *
25541  * if flags & PyBUF_INDIRECT:
25542  */
25543  /*else*/ {
25544  __pyx_v_info->strides = NULL;
25545  }
25546  __pyx_L7:;
25547 
25548  /* "View.MemoryView":532
25549  * info.strides = NULL
25550  *
25551  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
25552  * info.suboffsets = self.view.suboffsets
25553  * else:
25554  */
25555  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
25556  if (__pyx_t_1) {
25557 
25558  /* "View.MemoryView":533
25559  *
25560  * if flags & PyBUF_INDIRECT:
25561  * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
25562  * else:
25563  * info.suboffsets = NULL
25564  */
25565  __pyx_t_4 = __pyx_v_self->view.suboffsets;
25566  __pyx_v_info->suboffsets = __pyx_t_4;
25567 
25568  /* "View.MemoryView":532
25569  * info.strides = NULL
25570  *
25571  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
25572  * info.suboffsets = self.view.suboffsets
25573  * else:
25574  */
25575  goto __pyx_L8;
25576  }
25577 
25578  /* "View.MemoryView":535
25579  * info.suboffsets = self.view.suboffsets
25580  * else:
25581  * info.suboffsets = NULL # <<<<<<<<<<<<<<
25582  *
25583  * if flags & PyBUF_FORMAT:
25584  */
25585  /*else*/ {
25586  __pyx_v_info->suboffsets = NULL;
25587  }
25588  __pyx_L8:;
25589 
25590  /* "View.MemoryView":537
25591  * info.suboffsets = NULL
25592  *
25593  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
25594  * info.format = self.view.format
25595  * else:
25596  */
25597  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
25598  if (__pyx_t_1) {
25599 
25600  /* "View.MemoryView":538
25601  *
25602  * if flags & PyBUF_FORMAT:
25603  * info.format = self.view.format # <<<<<<<<<<<<<<
25604  * else:
25605  * info.format = NULL
25606  */
25607  __pyx_t_5 = __pyx_v_self->view.format;
25608  __pyx_v_info->format = __pyx_t_5;
25609 
25610  /* "View.MemoryView":537
25611  * info.suboffsets = NULL
25612  *
25613  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
25614  * info.format = self.view.format
25615  * else:
25616  */
25617  goto __pyx_L9;
25618  }
25619 
25620  /* "View.MemoryView":540
25621  * info.format = self.view.format
25622  * else:
25623  * info.format = NULL # <<<<<<<<<<<<<<
25624  *
25625  * info.buf = self.view.buf
25626  */
25627  /*else*/ {
25628  __pyx_v_info->format = NULL;
25629  }
25630  __pyx_L9:;
25631 
25632  /* "View.MemoryView":542
25633  * info.format = NULL
25634  *
25635  * info.buf = self.view.buf # <<<<<<<<<<<<<<
25636  * info.ndim = self.view.ndim
25637  * info.itemsize = self.view.itemsize
25638  */
25639  __pyx_t_6 = __pyx_v_self->view.buf;
25640  __pyx_v_info->buf = __pyx_t_6;
25641 
25642  /* "View.MemoryView":543
25643  *
25644  * info.buf = self.view.buf
25645  * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
25646  * info.itemsize = self.view.itemsize
25647  * info.len = self.view.len
25648  */
25649  __pyx_t_7 = __pyx_v_self->view.ndim;
25650  __pyx_v_info->ndim = __pyx_t_7;
25651 
25652  /* "View.MemoryView":544
25653  * info.buf = self.view.buf
25654  * info.ndim = self.view.ndim
25655  * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
25656  * info.len = self.view.len
25657  * info.readonly = self.view.readonly
25658  */
25659  __pyx_t_8 = __pyx_v_self->view.itemsize;
25660  __pyx_v_info->itemsize = __pyx_t_8;
25661 
25662  /* "View.MemoryView":545
25663  * info.ndim = self.view.ndim
25664  * info.itemsize = self.view.itemsize
25665  * info.len = self.view.len # <<<<<<<<<<<<<<
25666  * info.readonly = self.view.readonly
25667  * info.obj = self
25668  */
25669  __pyx_t_8 = __pyx_v_self->view.len;
25670  __pyx_v_info->len = __pyx_t_8;
25671 
25672  /* "View.MemoryView":546
25673  * info.itemsize = self.view.itemsize
25674  * info.len = self.view.len
25675  * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
25676  * info.obj = self
25677  *
25678  */
25679  __pyx_t_1 = __pyx_v_self->view.readonly;
25680  __pyx_v_info->readonly = __pyx_t_1;
25681 
25682  /* "View.MemoryView":547
25683  * info.len = self.view.len
25684  * info.readonly = self.view.readonly
25685  * info.obj = self # <<<<<<<<<<<<<<
25686  *
25687  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
25688  */
25689  __Pyx_INCREF(((PyObject *)__pyx_v_self));
25690  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
25691  __Pyx_GOTREF(__pyx_v_info->obj);
25692  __Pyx_DECREF(__pyx_v_info->obj);
25693  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
25694 
25695  /* "View.MemoryView":518
25696  *
25697  * @cname('getbuffer')
25698  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
25699  * if flags & PyBUF_WRITABLE and self.view.readonly:
25700  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25701  */
25702 
25703  /* function exit code */
25704  __pyx_r = 0;
25705  goto __pyx_L0;
25706  __pyx_L1_error:;
25707  __Pyx_XDECREF(__pyx_t_3);
25708  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25709  __pyx_r = -1;
25710  if (__pyx_v_info->obj != NULL) {
25711  __Pyx_GOTREF(__pyx_v_info->obj);
25712  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25713  }
25714  goto __pyx_L2;
25715  __pyx_L0:;
25716  if (__pyx_v_info->obj == Py_None) {
25717  __Pyx_GOTREF(__pyx_v_info->obj);
25718  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25719  }
25720  __pyx_L2:;
25721  __Pyx_RefNannyFinishContext();
25722  return __pyx_r;
25723 }
25724 
25725 /* "View.MemoryView":553
25726  *
25727  * @property
25728  * def T(self): # <<<<<<<<<<<<<<
25729  * cdef _memoryviewslice result = memoryview_copy(self)
25730  * transpose_memslice(&result.from_slice)
25731  */
25732 
25733 /* Python wrapper */
25734 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
25735 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
25736  PyObject *__pyx_r = 0;
25737  __Pyx_RefNannyDeclarations
25738  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25739  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25740 
25741  /* function exit code */
25742  __Pyx_RefNannyFinishContext();
25743  return __pyx_r;
25744 }
25745 
25746 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25747  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
25748  PyObject *__pyx_r = NULL;
25749  __Pyx_RefNannyDeclarations
25750  PyObject *__pyx_t_1 = NULL;
25751  int __pyx_t_2;
25752  __Pyx_RefNannySetupContext("__get__", 0);
25753 
25754  /* "View.MemoryView":554
25755  * @property
25756  * def T(self):
25757  * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
25758  * transpose_memslice(&result.from_slice)
25759  * return result
25760  */
25761  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
25762  __Pyx_GOTREF(__pyx_t_1);
25763  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(0, 554, __pyx_L1_error)
25764  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
25765  __pyx_t_1 = 0;
25766 
25767  /* "View.MemoryView":555
25768  * def T(self):
25769  * cdef _memoryviewslice result = memoryview_copy(self)
25770  * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
25771  * return result
25772  *
25773  */
25774  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 555, __pyx_L1_error)
25775 
25776  /* "View.MemoryView":556
25777  * cdef _memoryviewslice result = memoryview_copy(self)
25778  * transpose_memslice(&result.from_slice)
25779  * return result # <<<<<<<<<<<<<<
25780  *
25781  * @property
25782  */
25783  __Pyx_XDECREF(__pyx_r);
25784  __Pyx_INCREF(((PyObject *)__pyx_v_result));
25785  __pyx_r = ((PyObject *)__pyx_v_result);
25786  goto __pyx_L0;
25787 
25788  /* "View.MemoryView":553
25789  *
25790  * @property
25791  * def T(self): # <<<<<<<<<<<<<<
25792  * cdef _memoryviewslice result = memoryview_copy(self)
25793  * transpose_memslice(&result.from_slice)
25794  */
25795 
25796  /* function exit code */
25797  __pyx_L1_error:;
25798  __Pyx_XDECREF(__pyx_t_1);
25799  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25800  __pyx_r = NULL;
25801  __pyx_L0:;
25802  __Pyx_XDECREF((PyObject *)__pyx_v_result);
25803  __Pyx_XGIVEREF(__pyx_r);
25804  __Pyx_RefNannyFinishContext();
25805  return __pyx_r;
25806 }
25807 
25808 /* "View.MemoryView":559
25809  *
25810  * @property
25811  * def base(self): # <<<<<<<<<<<<<<
25812  * return self.obj
25813  *
25814  */
25815 
25816 /* Python wrapper */
25817 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
25818 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
25819  PyObject *__pyx_r = 0;
25820  __Pyx_RefNannyDeclarations
25821  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25822  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25823 
25824  /* function exit code */
25825  __Pyx_RefNannyFinishContext();
25826  return __pyx_r;
25827 }
25828 
25829 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25830  PyObject *__pyx_r = NULL;
25831  __Pyx_RefNannyDeclarations
25832  __Pyx_RefNannySetupContext("__get__", 0);
25833 
25834  /* "View.MemoryView":560
25835  * @property
25836  * def base(self):
25837  * return self.obj # <<<<<<<<<<<<<<
25838  *
25839  * @property
25840  */
25841  __Pyx_XDECREF(__pyx_r);
25842  __Pyx_INCREF(__pyx_v_self->obj);
25843  __pyx_r = __pyx_v_self->obj;
25844  goto __pyx_L0;
25845 
25846  /* "View.MemoryView":559
25847  *
25848  * @property
25849  * def base(self): # <<<<<<<<<<<<<<
25850  * return self.obj
25851  *
25852  */
25853 
25854  /* function exit code */
25855  __pyx_L0:;
25856  __Pyx_XGIVEREF(__pyx_r);
25857  __Pyx_RefNannyFinishContext();
25858  return __pyx_r;
25859 }
25860 
25861 /* "View.MemoryView":563
25862  *
25863  * @property
25864  * def shape(self): # <<<<<<<<<<<<<<
25865  * return tuple([length for length in self.view.shape[:self.view.ndim]])
25866  *
25867  */
25868 
25869 /* Python wrapper */
25870 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
25871 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
25872  PyObject *__pyx_r = 0;
25873  __Pyx_RefNannyDeclarations
25874  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25875  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25876 
25877  /* function exit code */
25878  __Pyx_RefNannyFinishContext();
25879  return __pyx_r;
25880 }
25881 
25882 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25883  Py_ssize_t __pyx_v_length;
25884  PyObject *__pyx_r = NULL;
25885  __Pyx_RefNannyDeclarations
25886  PyObject *__pyx_t_1 = NULL;
25887  Py_ssize_t *__pyx_t_2;
25888  Py_ssize_t *__pyx_t_3;
25889  Py_ssize_t *__pyx_t_4;
25890  PyObject *__pyx_t_5 = NULL;
25891  __Pyx_RefNannySetupContext("__get__", 0);
25892 
25893  /* "View.MemoryView":564
25894  * @property
25895  * def shape(self):
25896  * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
25897  *
25898  * @property
25899  */
25900  __Pyx_XDECREF(__pyx_r);
25901  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
25902  __Pyx_GOTREF(__pyx_t_1);
25903  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
25904  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
25905  __pyx_t_2 = __pyx_t_4;
25906  __pyx_v_length = (__pyx_t_2[0]);
25907  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
25908  __Pyx_GOTREF(__pyx_t_5);
25909  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 564, __pyx_L1_error)
25910  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25911  }
25912  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
25913  __Pyx_GOTREF(__pyx_t_5);
25914  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25915  __pyx_r = __pyx_t_5;
25916  __pyx_t_5 = 0;
25917  goto __pyx_L0;
25918 
25919  /* "View.MemoryView":563
25920  *
25921  * @property
25922  * def shape(self): # <<<<<<<<<<<<<<
25923  * return tuple([length for length in self.view.shape[:self.view.ndim]])
25924  *
25925  */
25926 
25927  /* function exit code */
25928  __pyx_L1_error:;
25929  __Pyx_XDECREF(__pyx_t_1);
25930  __Pyx_XDECREF(__pyx_t_5);
25931  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25932  __pyx_r = NULL;
25933  __pyx_L0:;
25934  __Pyx_XGIVEREF(__pyx_r);
25935  __Pyx_RefNannyFinishContext();
25936  return __pyx_r;
25937 }
25938 
25939 /* "View.MemoryView":567
25940  *
25941  * @property
25942  * def strides(self): # <<<<<<<<<<<<<<
25943  * if self.view.strides == NULL:
25944  *
25945  */
25946 
25947 /* Python wrapper */
25948 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
25949 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
25950  PyObject *__pyx_r = 0;
25951  __Pyx_RefNannyDeclarations
25952  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25953  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25954 
25955  /* function exit code */
25956  __Pyx_RefNannyFinishContext();
25957  return __pyx_r;
25958 }
25959 
25960 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25961  Py_ssize_t __pyx_v_stride;
25962  PyObject *__pyx_r = NULL;
25963  __Pyx_RefNannyDeclarations
25964  int __pyx_t_1;
25965  PyObject *__pyx_t_2 = NULL;
25966  Py_ssize_t *__pyx_t_3;
25967  Py_ssize_t *__pyx_t_4;
25968  Py_ssize_t *__pyx_t_5;
25969  PyObject *__pyx_t_6 = NULL;
25970  __Pyx_RefNannySetupContext("__get__", 0);
25971 
25972  /* "View.MemoryView":568
25973  * @property
25974  * def strides(self):
25975  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
25976  *
25977  * raise ValueError("Buffer view does not expose strides")
25978  */
25979  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
25980  if (unlikely(__pyx_t_1)) {
25981 
25982  /* "View.MemoryView":570
25983  * if self.view.strides == NULL:
25984  *
25985  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
25986  *
25987  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
25988  */
25989  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
25990  __Pyx_GOTREF(__pyx_t_2);
25991  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
25992  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25993  __PYX_ERR(0, 570, __pyx_L1_error)
25994 
25995  /* "View.MemoryView":568
25996  * @property
25997  * def strides(self):
25998  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
25999  *
26000  * raise ValueError("Buffer view does not expose strides")
26001  */
26002  }
26003 
26004  /* "View.MemoryView":572
26005  * raise ValueError("Buffer view does not expose strides")
26006  *
26007  * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
26008  *
26009  * @property
26010  */
26011  __Pyx_XDECREF(__pyx_r);
26012  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
26013  __Pyx_GOTREF(__pyx_t_2);
26014  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
26015  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
26016  __pyx_t_3 = __pyx_t_5;
26017  __pyx_v_stride = (__pyx_t_3[0]);
26018  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
26019  __Pyx_GOTREF(__pyx_t_6);
26020  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 572, __pyx_L1_error)
26021  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26022  }
26023  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
26024  __Pyx_GOTREF(__pyx_t_6);
26025  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26026  __pyx_r = __pyx_t_6;
26027  __pyx_t_6 = 0;
26028  goto __pyx_L0;
26029 
26030  /* "View.MemoryView":567
26031  *
26032  * @property
26033  * def strides(self): # <<<<<<<<<<<<<<
26034  * if self.view.strides == NULL:
26035  *
26036  */
26037 
26038  /* function exit code */
26039  __pyx_L1_error:;
26040  __Pyx_XDECREF(__pyx_t_2);
26041  __Pyx_XDECREF(__pyx_t_6);
26042  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26043  __pyx_r = NULL;
26044  __pyx_L0:;
26045  __Pyx_XGIVEREF(__pyx_r);
26046  __Pyx_RefNannyFinishContext();
26047  return __pyx_r;
26048 }
26049 
26050 /* "View.MemoryView":575
26051  *
26052  * @property
26053  * def suboffsets(self): # <<<<<<<<<<<<<<
26054  * if self.view.suboffsets == NULL:
26055  * return (-1,) * self.view.ndim
26056  */
26057 
26058 /* Python wrapper */
26059 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
26060 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
26061  PyObject *__pyx_r = 0;
26062  __Pyx_RefNannyDeclarations
26063  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26064  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26065 
26066  /* function exit code */
26067  __Pyx_RefNannyFinishContext();
26068  return __pyx_r;
26069 }
26070 
26071 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26072  Py_ssize_t __pyx_v_suboffset;
26073  PyObject *__pyx_r = NULL;
26074  __Pyx_RefNannyDeclarations
26075  int __pyx_t_1;
26076  PyObject *__pyx_t_2 = NULL;
26077  PyObject *__pyx_t_3 = NULL;
26078  Py_ssize_t *__pyx_t_4;
26079  Py_ssize_t *__pyx_t_5;
26080  Py_ssize_t *__pyx_t_6;
26081  __Pyx_RefNannySetupContext("__get__", 0);
26082 
26083  /* "View.MemoryView":576
26084  * @property
26085  * def suboffsets(self):
26086  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
26087  * return (-1,) * self.view.ndim
26088  *
26089  */
26090  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
26091  if (__pyx_t_1) {
26092 
26093  /* "View.MemoryView":577
26094  * def suboffsets(self):
26095  * if self.view.suboffsets == NULL:
26096  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
26097  *
26098  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
26099  */
26100  __Pyx_XDECREF(__pyx_r);
26101  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
26102  __Pyx_GOTREF(__pyx_t_2);
26103  __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__24, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
26104  __Pyx_GOTREF(__pyx_t_3);
26105  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26106  __pyx_r = __pyx_t_3;
26107  __pyx_t_3 = 0;
26108  goto __pyx_L0;
26109 
26110  /* "View.MemoryView":576
26111  * @property
26112  * def suboffsets(self):
26113  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
26114  * return (-1,) * self.view.ndim
26115  *
26116  */
26117  }
26118 
26119  /* "View.MemoryView":579
26120  * return (-1,) * self.view.ndim
26121  *
26122  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
26123  *
26124  * @property
26125  */
26126  __Pyx_XDECREF(__pyx_r);
26127  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error)
26128  __Pyx_GOTREF(__pyx_t_3);
26129  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
26130  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
26131  __pyx_t_4 = __pyx_t_6;
26132  __pyx_v_suboffset = (__pyx_t_4[0]);
26133  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
26134  __Pyx_GOTREF(__pyx_t_2);
26135  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 579, __pyx_L1_error)
26136  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26137  }
26138  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
26139  __Pyx_GOTREF(__pyx_t_2);
26140  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26141  __pyx_r = __pyx_t_2;
26142  __pyx_t_2 = 0;
26143  goto __pyx_L0;
26144 
26145  /* "View.MemoryView":575
26146  *
26147  * @property
26148  * def suboffsets(self): # <<<<<<<<<<<<<<
26149  * if self.view.suboffsets == NULL:
26150  * return (-1,) * self.view.ndim
26151  */
26152 
26153  /* function exit code */
26154  __pyx_L1_error:;
26155  __Pyx_XDECREF(__pyx_t_2);
26156  __Pyx_XDECREF(__pyx_t_3);
26157  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26158  __pyx_r = NULL;
26159  __pyx_L0:;
26160  __Pyx_XGIVEREF(__pyx_r);
26161  __Pyx_RefNannyFinishContext();
26162  return __pyx_r;
26163 }
26164 
26165 /* "View.MemoryView":582
26166  *
26167  * @property
26168  * def ndim(self): # <<<<<<<<<<<<<<
26169  * return self.view.ndim
26170  *
26171  */
26172 
26173 /* Python wrapper */
26174 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
26175 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
26176  PyObject *__pyx_r = 0;
26177  __Pyx_RefNannyDeclarations
26178  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26179  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26180 
26181  /* function exit code */
26182  __Pyx_RefNannyFinishContext();
26183  return __pyx_r;
26184 }
26185 
26186 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26187  PyObject *__pyx_r = NULL;
26188  __Pyx_RefNannyDeclarations
26189  PyObject *__pyx_t_1 = NULL;
26190  __Pyx_RefNannySetupContext("__get__", 0);
26191 
26192  /* "View.MemoryView":583
26193  * @property
26194  * def ndim(self):
26195  * return self.view.ndim # <<<<<<<<<<<<<<
26196  *
26197  * @property
26198  */
26199  __Pyx_XDECREF(__pyx_r);
26200  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
26201  __Pyx_GOTREF(__pyx_t_1);
26202  __pyx_r = __pyx_t_1;
26203  __pyx_t_1 = 0;
26204  goto __pyx_L0;
26205 
26206  /* "View.MemoryView":582
26207  *
26208  * @property
26209  * def ndim(self): # <<<<<<<<<<<<<<
26210  * return self.view.ndim
26211  *
26212  */
26213 
26214  /* function exit code */
26215  __pyx_L1_error:;
26216  __Pyx_XDECREF(__pyx_t_1);
26217  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26218  __pyx_r = NULL;
26219  __pyx_L0:;
26220  __Pyx_XGIVEREF(__pyx_r);
26221  __Pyx_RefNannyFinishContext();
26222  return __pyx_r;
26223 }
26224 
26225 /* "View.MemoryView":586
26226  *
26227  * @property
26228  * def itemsize(self): # <<<<<<<<<<<<<<
26229  * return self.view.itemsize
26230  *
26231  */
26232 
26233 /* Python wrapper */
26234 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
26235 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
26236  PyObject *__pyx_r = 0;
26237  __Pyx_RefNannyDeclarations
26238  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26239  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26240 
26241  /* function exit code */
26242  __Pyx_RefNannyFinishContext();
26243  return __pyx_r;
26244 }
26245 
26246 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26247  PyObject *__pyx_r = NULL;
26248  __Pyx_RefNannyDeclarations
26249  PyObject *__pyx_t_1 = NULL;
26250  __Pyx_RefNannySetupContext("__get__", 0);
26251 
26252  /* "View.MemoryView":587
26253  * @property
26254  * def itemsize(self):
26255  * return self.view.itemsize # <<<<<<<<<<<<<<
26256  *
26257  * @property
26258  */
26259  __Pyx_XDECREF(__pyx_r);
26260  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
26261  __Pyx_GOTREF(__pyx_t_1);
26262  __pyx_r = __pyx_t_1;
26263  __pyx_t_1 = 0;
26264  goto __pyx_L0;
26265 
26266  /* "View.MemoryView":586
26267  *
26268  * @property
26269  * def itemsize(self): # <<<<<<<<<<<<<<
26270  * return self.view.itemsize
26271  *
26272  */
26273 
26274  /* function exit code */
26275  __pyx_L1_error:;
26276  __Pyx_XDECREF(__pyx_t_1);
26277  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26278  __pyx_r = NULL;
26279  __pyx_L0:;
26280  __Pyx_XGIVEREF(__pyx_r);
26281  __Pyx_RefNannyFinishContext();
26282  return __pyx_r;
26283 }
26284 
26285 /* "View.MemoryView":590
26286  *
26287  * @property
26288  * def nbytes(self): # <<<<<<<<<<<<<<
26289  * return self.size * self.view.itemsize
26290  *
26291  */
26292 
26293 /* Python wrapper */
26294 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
26295 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
26296  PyObject *__pyx_r = 0;
26297  __Pyx_RefNannyDeclarations
26298  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26299  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26300 
26301  /* function exit code */
26302  __Pyx_RefNannyFinishContext();
26303  return __pyx_r;
26304 }
26305 
26306 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26307  PyObject *__pyx_r = NULL;
26308  __Pyx_RefNannyDeclarations
26309  PyObject *__pyx_t_1 = NULL;
26310  PyObject *__pyx_t_2 = NULL;
26311  PyObject *__pyx_t_3 = NULL;
26312  __Pyx_RefNannySetupContext("__get__", 0);
26313 
26314  /* "View.MemoryView":591
26315  * @property
26316  * def nbytes(self):
26317  * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
26318  *
26319  * @property
26320  */
26321  __Pyx_XDECREF(__pyx_r);
26322  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
26323  __Pyx_GOTREF(__pyx_t_1);
26324  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
26325  __Pyx_GOTREF(__pyx_t_2);
26326  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error)
26327  __Pyx_GOTREF(__pyx_t_3);
26328  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26329  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26330  __pyx_r = __pyx_t_3;
26331  __pyx_t_3 = 0;
26332  goto __pyx_L0;
26333 
26334  /* "View.MemoryView":590
26335  *
26336  * @property
26337  * def nbytes(self): # <<<<<<<<<<<<<<
26338  * return self.size * self.view.itemsize
26339  *
26340  */
26341 
26342  /* function exit code */
26343  __pyx_L1_error:;
26344  __Pyx_XDECREF(__pyx_t_1);
26345  __Pyx_XDECREF(__pyx_t_2);
26346  __Pyx_XDECREF(__pyx_t_3);
26347  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26348  __pyx_r = NULL;
26349  __pyx_L0:;
26350  __Pyx_XGIVEREF(__pyx_r);
26351  __Pyx_RefNannyFinishContext();
26352  return __pyx_r;
26353 }
26354 
26355 /* "View.MemoryView":594
26356  *
26357  * @property
26358  * def size(self): # <<<<<<<<<<<<<<
26359  * if self._size is None:
26360  * result = 1
26361  */
26362 
26363 /* Python wrapper */
26364 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
26365 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
26366  PyObject *__pyx_r = 0;
26367  __Pyx_RefNannyDeclarations
26368  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26369  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26370 
26371  /* function exit code */
26372  __Pyx_RefNannyFinishContext();
26373  return __pyx_r;
26374 }
26375 
26376 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26377  PyObject *__pyx_v_result = NULL;
26378  PyObject *__pyx_v_length = NULL;
26379  PyObject *__pyx_r = NULL;
26380  __Pyx_RefNannyDeclarations
26381  int __pyx_t_1;
26382  int __pyx_t_2;
26383  Py_ssize_t *__pyx_t_3;
26384  Py_ssize_t *__pyx_t_4;
26385  Py_ssize_t *__pyx_t_5;
26386  PyObject *__pyx_t_6 = NULL;
26387  __Pyx_RefNannySetupContext("__get__", 0);
26388 
26389  /* "View.MemoryView":595
26390  * @property
26391  * def size(self):
26392  * if self._size is None: # <<<<<<<<<<<<<<
26393  * result = 1
26394  *
26395  */
26396  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
26397  __pyx_t_2 = (__pyx_t_1 != 0);
26398  if (__pyx_t_2) {
26399 
26400  /* "View.MemoryView":596
26401  * def size(self):
26402  * if self._size is None:
26403  * result = 1 # <<<<<<<<<<<<<<
26404  *
26405  * for length in self.view.shape[:self.view.ndim]:
26406  */
26407  __Pyx_INCREF(__pyx_int_1);
26408  __pyx_v_result = __pyx_int_1;
26409 
26410  /* "View.MemoryView":598
26411  * result = 1
26412  *
26413  * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
26414  * result *= length
26415  *
26416  */
26417  __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
26418  for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
26419  __pyx_t_3 = __pyx_t_5;
26420  __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error)
26421  __Pyx_GOTREF(__pyx_t_6);
26422  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
26423  __pyx_t_6 = 0;
26424 
26425  /* "View.MemoryView":599
26426  *
26427  * for length in self.view.shape[:self.view.ndim]:
26428  * result *= length # <<<<<<<<<<<<<<
26429  *
26430  * self._size = result
26431  */
26432  __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error)
26433  __Pyx_GOTREF(__pyx_t_6);
26434  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
26435  __pyx_t_6 = 0;
26436  }
26437 
26438  /* "View.MemoryView":601
26439  * result *= length
26440  *
26441  * self._size = result # <<<<<<<<<<<<<<
26442  *
26443  * return self._size
26444  */
26445  __Pyx_INCREF(__pyx_v_result);
26446  __Pyx_GIVEREF(__pyx_v_result);
26447  __Pyx_GOTREF(__pyx_v_self->_size);
26448  __Pyx_DECREF(__pyx_v_self->_size);
26449  __pyx_v_self->_size = __pyx_v_result;
26450 
26451  /* "View.MemoryView":595
26452  * @property
26453  * def size(self):
26454  * if self._size is None: # <<<<<<<<<<<<<<
26455  * result = 1
26456  *
26457  */
26458  }
26459 
26460  /* "View.MemoryView":603
26461  * self._size = result
26462  *
26463  * return self._size # <<<<<<<<<<<<<<
26464  *
26465  * def __len__(self):
26466  */
26467  __Pyx_XDECREF(__pyx_r);
26468  __Pyx_INCREF(__pyx_v_self->_size);
26469  __pyx_r = __pyx_v_self->_size;
26470  goto __pyx_L0;
26471 
26472  /* "View.MemoryView":594
26473  *
26474  * @property
26475  * def size(self): # <<<<<<<<<<<<<<
26476  * if self._size is None:
26477  * result = 1
26478  */
26479 
26480  /* function exit code */
26481  __pyx_L1_error:;
26482  __Pyx_XDECREF(__pyx_t_6);
26483  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26484  __pyx_r = NULL;
26485  __pyx_L0:;
26486  __Pyx_XDECREF(__pyx_v_result);
26487  __Pyx_XDECREF(__pyx_v_length);
26488  __Pyx_XGIVEREF(__pyx_r);
26489  __Pyx_RefNannyFinishContext();
26490  return __pyx_r;
26491 }
26492 
26493 /* "View.MemoryView":605
26494  * return self._size
26495  *
26496  * def __len__(self): # <<<<<<<<<<<<<<
26497  * if self.view.ndim >= 1:
26498  * return self.view.shape[0]
26499  */
26500 
26501 /* Python wrapper */
26502 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
26503 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
26504  Py_ssize_t __pyx_r;
26505  __Pyx_RefNannyDeclarations
26506  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
26507  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26508 
26509  /* function exit code */
26510  __Pyx_RefNannyFinishContext();
26511  return __pyx_r;
26512 }
26513 
26514 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
26515  Py_ssize_t __pyx_r;
26516  __Pyx_RefNannyDeclarations
26517  int __pyx_t_1;
26518  __Pyx_RefNannySetupContext("__len__", 0);
26519 
26520  /* "View.MemoryView":606
26521  *
26522  * def __len__(self):
26523  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
26524  * return self.view.shape[0]
26525  *
26526  */
26527  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
26528  if (__pyx_t_1) {
26529 
26530  /* "View.MemoryView":607
26531  * def __len__(self):
26532  * if self.view.ndim >= 1:
26533  * return self.view.shape[0] # <<<<<<<<<<<<<<
26534  *
26535  * return 0
26536  */
26537  __pyx_r = (__pyx_v_self->view.shape[0]);
26538  goto __pyx_L0;
26539 
26540  /* "View.MemoryView":606
26541  *
26542  * def __len__(self):
26543  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
26544  * return self.view.shape[0]
26545  *
26546  */
26547  }
26548 
26549  /* "View.MemoryView":609
26550  * return self.view.shape[0]
26551  *
26552  * return 0 # <<<<<<<<<<<<<<
26553  *
26554  * def __repr__(self):
26555  */
26556  __pyx_r = 0;
26557  goto __pyx_L0;
26558 
26559  /* "View.MemoryView":605
26560  * return self._size
26561  *
26562  * def __len__(self): # <<<<<<<<<<<<<<
26563  * if self.view.ndim >= 1:
26564  * return self.view.shape[0]
26565  */
26566 
26567  /* function exit code */
26568  __pyx_L0:;
26569  __Pyx_RefNannyFinishContext();
26570  return __pyx_r;
26571 }
26572 
26573 /* "View.MemoryView":611
26574  * return 0
26575  *
26576  * def __repr__(self): # <<<<<<<<<<<<<<
26577  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
26578  * id(self))
26579  */
26580 
26581 /* Python wrapper */
26582 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
26583 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
26584  PyObject *__pyx_r = 0;
26585  __Pyx_RefNannyDeclarations
26586  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
26587  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26588 
26589  /* function exit code */
26590  __Pyx_RefNannyFinishContext();
26591  return __pyx_r;
26592 }
26593 
26594 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
26595  PyObject *__pyx_r = NULL;
26596  __Pyx_RefNannyDeclarations
26597  PyObject *__pyx_t_1 = NULL;
26598  PyObject *__pyx_t_2 = NULL;
26599  PyObject *__pyx_t_3 = NULL;
26600  __Pyx_RefNannySetupContext("__repr__", 0);
26601 
26602  /* "View.MemoryView":612
26603  *
26604  * def __repr__(self):
26605  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
26606  * id(self))
26607  *
26608  */
26609  __Pyx_XDECREF(__pyx_r);
26610  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
26611  __Pyx_GOTREF(__pyx_t_1);
26612  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
26613  __Pyx_GOTREF(__pyx_t_2);
26614  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26615  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
26616  __Pyx_GOTREF(__pyx_t_1);
26617  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26618 
26619  /* "View.MemoryView":613
26620  * def __repr__(self):
26621  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
26622  * id(self)) # <<<<<<<<<<<<<<
26623  *
26624  * def __str__(self):
26625  */
26626  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
26627  __Pyx_GOTREF(__pyx_t_2);
26628 
26629  /* "View.MemoryView":612
26630  *
26631  * def __repr__(self):
26632  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
26633  * id(self))
26634  *
26635  */
26636  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
26637  __Pyx_GOTREF(__pyx_t_3);
26638  __Pyx_GIVEREF(__pyx_t_1);
26639  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
26640  __Pyx_GIVEREF(__pyx_t_2);
26641  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
26642  __pyx_t_1 = 0;
26643  __pyx_t_2 = 0;
26644  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
26645  __Pyx_GOTREF(__pyx_t_2);
26646  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26647  __pyx_r = __pyx_t_2;
26648  __pyx_t_2 = 0;
26649  goto __pyx_L0;
26650 
26651  /* "View.MemoryView":611
26652  * return 0
26653  *
26654  * def __repr__(self): # <<<<<<<<<<<<<<
26655  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
26656  * id(self))
26657  */
26658 
26659  /* function exit code */
26660  __pyx_L1_error:;
26661  __Pyx_XDECREF(__pyx_t_1);
26662  __Pyx_XDECREF(__pyx_t_2);
26663  __Pyx_XDECREF(__pyx_t_3);
26664  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26665  __pyx_r = NULL;
26666  __pyx_L0:;
26667  __Pyx_XGIVEREF(__pyx_r);
26668  __Pyx_RefNannyFinishContext();
26669  return __pyx_r;
26670 }
26671 
26672 /* "View.MemoryView":615
26673  * id(self))
26674  *
26675  * def __str__(self): # <<<<<<<<<<<<<<
26676  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
26677  *
26678  */
26679 
26680 /* Python wrapper */
26681 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
26682 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
26683  PyObject *__pyx_r = 0;
26684  __Pyx_RefNannyDeclarations
26685  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
26686  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26687 
26688  /* function exit code */
26689  __Pyx_RefNannyFinishContext();
26690  return __pyx_r;
26691 }
26692 
26693 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
26694  PyObject *__pyx_r = NULL;
26695  __Pyx_RefNannyDeclarations
26696  PyObject *__pyx_t_1 = NULL;
26697  PyObject *__pyx_t_2 = NULL;
26698  __Pyx_RefNannySetupContext("__str__", 0);
26699 
26700  /* "View.MemoryView":616
26701  *
26702  * def __str__(self):
26703  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
26704  *
26705  *
26706  */
26707  __Pyx_XDECREF(__pyx_r);
26708  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
26709  __Pyx_GOTREF(__pyx_t_1);
26710  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
26711  __Pyx_GOTREF(__pyx_t_2);
26712  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26713  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
26714  __Pyx_GOTREF(__pyx_t_1);
26715  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26716  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
26717  __Pyx_GOTREF(__pyx_t_2);
26718  __Pyx_GIVEREF(__pyx_t_1);
26719  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
26720  __pyx_t_1 = 0;
26721  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
26722  __Pyx_GOTREF(__pyx_t_1);
26723  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26724  __pyx_r = __pyx_t_1;
26725  __pyx_t_1 = 0;
26726  goto __pyx_L0;
26727 
26728  /* "View.MemoryView":615
26729  * id(self))
26730  *
26731  * def __str__(self): # <<<<<<<<<<<<<<
26732  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
26733  *
26734  */
26735 
26736  /* function exit code */
26737  __pyx_L1_error:;
26738  __Pyx_XDECREF(__pyx_t_1);
26739  __Pyx_XDECREF(__pyx_t_2);
26740  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26741  __pyx_r = NULL;
26742  __pyx_L0:;
26743  __Pyx_XGIVEREF(__pyx_r);
26744  __Pyx_RefNannyFinishContext();
26745  return __pyx_r;
26746 }
26747 
26748 /* "View.MemoryView":619
26749  *
26750  *
26751  * def is_c_contig(self): # <<<<<<<<<<<<<<
26752  * cdef __Pyx_memviewslice *mslice
26753  * cdef __Pyx_memviewslice tmp
26754  */
26755 
26756 /* Python wrapper */
26757 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26758 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26759  PyObject *__pyx_r = 0;
26760  __Pyx_RefNannyDeclarations
26761  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
26762  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
26763 
26764  /* function exit code */
26765  __Pyx_RefNannyFinishContext();
26766  return __pyx_r;
26767 }
26768 
26769 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
26770  __Pyx_memviewslice *__pyx_v_mslice;
26771  __Pyx_memviewslice __pyx_v_tmp;
26772  PyObject *__pyx_r = NULL;
26773  __Pyx_RefNannyDeclarations
26774  __Pyx_memviewslice *__pyx_t_1;
26775  PyObject *__pyx_t_2 = NULL;
26776  __Pyx_RefNannySetupContext("is_c_contig", 0);
26777 
26778  /* "View.MemoryView":622
26779  * cdef __Pyx_memviewslice *mslice
26780  * cdef __Pyx_memviewslice tmp
26781  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
26782  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26783  *
26784  */
26785  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 622, __pyx_L1_error)
26786  __pyx_v_mslice = __pyx_t_1;
26787 
26788  /* "View.MemoryView":623
26789  * cdef __Pyx_memviewslice tmp
26790  * mslice = get_slice_from_memview(self, &tmp)
26791  * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
26792  *
26793  * def is_f_contig(self):
26794  */
26795  __Pyx_XDECREF(__pyx_r);
26796  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error)
26797  __Pyx_GOTREF(__pyx_t_2);
26798  __pyx_r = __pyx_t_2;
26799  __pyx_t_2 = 0;
26800  goto __pyx_L0;
26801 
26802  /* "View.MemoryView":619
26803  *
26804  *
26805  * def is_c_contig(self): # <<<<<<<<<<<<<<
26806  * cdef __Pyx_memviewslice *mslice
26807  * cdef __Pyx_memviewslice tmp
26808  */
26809 
26810  /* function exit code */
26811  __pyx_L1_error:;
26812  __Pyx_XDECREF(__pyx_t_2);
26813  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
26814  __pyx_r = NULL;
26815  __pyx_L0:;
26816  __Pyx_XGIVEREF(__pyx_r);
26817  __Pyx_RefNannyFinishContext();
26818  return __pyx_r;
26819 }
26820 
26821 /* "View.MemoryView":625
26822  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26823  *
26824  * def is_f_contig(self): # <<<<<<<<<<<<<<
26825  * cdef __Pyx_memviewslice *mslice
26826  * cdef __Pyx_memviewslice tmp
26827  */
26828 
26829 /* Python wrapper */
26830 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26831 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26832  PyObject *__pyx_r = 0;
26833  __Pyx_RefNannyDeclarations
26834  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
26835  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
26836 
26837  /* function exit code */
26838  __Pyx_RefNannyFinishContext();
26839  return __pyx_r;
26840 }
26841 
26842 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
26843  __Pyx_memviewslice *__pyx_v_mslice;
26844  __Pyx_memviewslice __pyx_v_tmp;
26845  PyObject *__pyx_r = NULL;
26846  __Pyx_RefNannyDeclarations
26847  __Pyx_memviewslice *__pyx_t_1;
26848  PyObject *__pyx_t_2 = NULL;
26849  __Pyx_RefNannySetupContext("is_f_contig", 0);
26850 
26851  /* "View.MemoryView":628
26852  * cdef __Pyx_memviewslice *mslice
26853  * cdef __Pyx_memviewslice tmp
26854  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
26855  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26856  *
26857  */
26858  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 628, __pyx_L1_error)
26859  __pyx_v_mslice = __pyx_t_1;
26860 
26861  /* "View.MemoryView":629
26862  * cdef __Pyx_memviewslice tmp
26863  * mslice = get_slice_from_memview(self, &tmp)
26864  * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
26865  *
26866  * def copy(self):
26867  */
26868  __Pyx_XDECREF(__pyx_r);
26869  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
26870  __Pyx_GOTREF(__pyx_t_2);
26871  __pyx_r = __pyx_t_2;
26872  __pyx_t_2 = 0;
26873  goto __pyx_L0;
26874 
26875  /* "View.MemoryView":625
26876  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26877  *
26878  * def is_f_contig(self): # <<<<<<<<<<<<<<
26879  * cdef __Pyx_memviewslice *mslice
26880  * cdef __Pyx_memviewslice tmp
26881  */
26882 
26883  /* function exit code */
26884  __pyx_L1_error:;
26885  __Pyx_XDECREF(__pyx_t_2);
26886  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
26887  __pyx_r = NULL;
26888  __pyx_L0:;
26889  __Pyx_XGIVEREF(__pyx_r);
26890  __Pyx_RefNannyFinishContext();
26891  return __pyx_r;
26892 }
26893 
26894 /* "View.MemoryView":631
26895  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26896  *
26897  * def copy(self): # <<<<<<<<<<<<<<
26898  * cdef __Pyx_memviewslice mslice
26899  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26900  */
26901 
26902 /* Python wrapper */
26903 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26904 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26905  PyObject *__pyx_r = 0;
26906  __Pyx_RefNannyDeclarations
26907  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
26908  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
26909 
26910  /* function exit code */
26911  __Pyx_RefNannyFinishContext();
26912  return __pyx_r;
26913 }
26914 
26915 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
26916  __Pyx_memviewslice __pyx_v_mslice;
26917  int __pyx_v_flags;
26918  PyObject *__pyx_r = NULL;
26919  __Pyx_RefNannyDeclarations
26920  __Pyx_memviewslice __pyx_t_1;
26921  PyObject *__pyx_t_2 = NULL;
26922  __Pyx_RefNannySetupContext("copy", 0);
26923 
26924  /* "View.MemoryView":633
26925  * def copy(self):
26926  * cdef __Pyx_memviewslice mslice
26927  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
26928  *
26929  * slice_copy(self, &mslice)
26930  */
26931  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
26932 
26933  /* "View.MemoryView":635
26934  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26935  *
26936  * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
26937  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
26938  * self.view.itemsize,
26939  */
26940  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
26941 
26942  /* "View.MemoryView":636
26943  *
26944  * slice_copy(self, &mslice)
26945  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
26946  * self.view.itemsize,
26947  * flags|PyBUF_C_CONTIGUOUS,
26948  */
26949  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
26950  __pyx_v_mslice = __pyx_t_1;
26951 
26952  /* "View.MemoryView":641
26953  * self.dtype_is_object)
26954  *
26955  * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
26956  *
26957  * def copy_fortran(self):
26958  */
26959  __Pyx_XDECREF(__pyx_r);
26960  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
26961  __Pyx_GOTREF(__pyx_t_2);
26962  __pyx_r = __pyx_t_2;
26963  __pyx_t_2 = 0;
26964  goto __pyx_L0;
26965 
26966  /* "View.MemoryView":631
26967  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26968  *
26969  * def copy(self): # <<<<<<<<<<<<<<
26970  * cdef __Pyx_memviewslice mslice
26971  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26972  */
26973 
26974  /* function exit code */
26975  __pyx_L1_error:;
26976  __Pyx_XDECREF(__pyx_t_2);
26977  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
26978  __pyx_r = NULL;
26979  __pyx_L0:;
26980  __Pyx_XGIVEREF(__pyx_r);
26981  __Pyx_RefNannyFinishContext();
26982  return __pyx_r;
26983 }
26984 
26985 /* "View.MemoryView":643
26986  * return memoryview_copy_from_slice(self, &mslice)
26987  *
26988  * def copy_fortran(self): # <<<<<<<<<<<<<<
26989  * cdef __Pyx_memviewslice src, dst
26990  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
26991  */
26992 
26993 /* Python wrapper */
26994 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26995 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26996  PyObject *__pyx_r = 0;
26997  __Pyx_RefNannyDeclarations
26998  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
26999  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
27000 
27001  /* function exit code */
27002  __Pyx_RefNannyFinishContext();
27003  return __pyx_r;
27004 }
27005 
27006 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
27007  __Pyx_memviewslice __pyx_v_src;
27008  __Pyx_memviewslice __pyx_v_dst;
27009  int __pyx_v_flags;
27010  PyObject *__pyx_r = NULL;
27011  __Pyx_RefNannyDeclarations
27012  __Pyx_memviewslice __pyx_t_1;
27013  PyObject *__pyx_t_2 = NULL;
27014  __Pyx_RefNannySetupContext("copy_fortran", 0);
27015 
27016  /* "View.MemoryView":645
27017  * def copy_fortran(self):
27018  * cdef __Pyx_memviewslice src, dst
27019  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
27020  *
27021  * slice_copy(self, &src)
27022  */
27023  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
27024 
27025  /* "View.MemoryView":647
27026  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
27027  *
27028  * slice_copy(self, &src) # <<<<<<<<<<<<<<
27029  * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
27030  * self.view.itemsize,
27031  */
27032  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
27033 
27034  /* "View.MemoryView":648
27035  *
27036  * slice_copy(self, &src)
27037  * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
27038  * self.view.itemsize,
27039  * flags|PyBUF_F_CONTIGUOUS,
27040  */
27041  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L1_error)
27042  __pyx_v_dst = __pyx_t_1;
27043 
27044  /* "View.MemoryView":653
27045  * self.dtype_is_object)
27046  *
27047  * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
27048  *
27049  *
27050  */
27051  __Pyx_XDECREF(__pyx_r);
27052  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
27053  __Pyx_GOTREF(__pyx_t_2);
27054  __pyx_r = __pyx_t_2;
27055  __pyx_t_2 = 0;
27056  goto __pyx_L0;
27057 
27058  /* "View.MemoryView":643
27059  * return memoryview_copy_from_slice(self, &mslice)
27060  *
27061  * def copy_fortran(self): # <<<<<<<<<<<<<<
27062  * cdef __Pyx_memviewslice src, dst
27063  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
27064  */
27065 
27066  /* function exit code */
27067  __pyx_L1_error:;
27068  __Pyx_XDECREF(__pyx_t_2);
27069  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
27070  __pyx_r = NULL;
27071  __pyx_L0:;
27072  __Pyx_XGIVEREF(__pyx_r);
27073  __Pyx_RefNannyFinishContext();
27074  return __pyx_r;
27075 }
27076 
27077 /* "(tree fragment)":1
27078  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
27079  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27080  * def __setstate_cython__(self, __pyx_state):
27081  */
27082 
27083 /* Python wrapper */
27084 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
27085 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
27086  PyObject *__pyx_r = 0;
27087  __Pyx_RefNannyDeclarations
27088  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
27089  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
27090 
27091  /* function exit code */
27092  __Pyx_RefNannyFinishContext();
27093  return __pyx_r;
27094 }
27095 
27096 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
27097  PyObject *__pyx_r = NULL;
27098  __Pyx_RefNannyDeclarations
27099  PyObject *__pyx_t_1 = NULL;
27100  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
27101 
27102  /* "(tree fragment)":2
27103  * def __reduce_cython__(self):
27104  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
27105  * def __setstate_cython__(self, __pyx_state):
27106  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27107  */
27108  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
27109  __Pyx_GOTREF(__pyx_t_1);
27110  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
27111  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27112  __PYX_ERR(0, 2, __pyx_L1_error)
27113 
27114  /* "(tree fragment)":1
27115  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
27116  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27117  * def __setstate_cython__(self, __pyx_state):
27118  */
27119 
27120  /* function exit code */
27121  __pyx_L1_error:;
27122  __Pyx_XDECREF(__pyx_t_1);
27123  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27124  __pyx_r = NULL;
27125  __Pyx_XGIVEREF(__pyx_r);
27126  __Pyx_RefNannyFinishContext();
27127  return __pyx_r;
27128 }
27129 
27130 /* "(tree fragment)":3
27131  * def __reduce_cython__(self):
27132  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27133  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
27134  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27135  */
27136 
27137 /* Python wrapper */
27138 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
27139 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
27140  PyObject *__pyx_r = 0;
27141  __Pyx_RefNannyDeclarations
27142  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
27143  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
27144 
27145  /* function exit code */
27146  __Pyx_RefNannyFinishContext();
27147  return __pyx_r;
27148 }
27149 
27150 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
27151  PyObject *__pyx_r = NULL;
27152  __Pyx_RefNannyDeclarations
27153  PyObject *__pyx_t_1 = NULL;
27154  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
27155 
27156  /* "(tree fragment)":4
27157  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27158  * def __setstate_cython__(self, __pyx_state):
27159  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
27160  */
27161  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
27162  __Pyx_GOTREF(__pyx_t_1);
27163  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
27164  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27165  __PYX_ERR(0, 4, __pyx_L1_error)
27166 
27167  /* "(tree fragment)":3
27168  * def __reduce_cython__(self):
27169  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27170  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
27171  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27172  */
27173 
27174  /* function exit code */
27175  __pyx_L1_error:;
27176  __Pyx_XDECREF(__pyx_t_1);
27177  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27178  __pyx_r = NULL;
27179  __Pyx_XGIVEREF(__pyx_r);
27180  __Pyx_RefNannyFinishContext();
27181  return __pyx_r;
27182 }
27183 
27184 /* "View.MemoryView":657
27185  *
27186  * @cname('__pyx_memoryview_new')
27187  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
27188  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27189  * result.typeinfo = typeinfo
27190  */
27191 
27192 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
27193  struct __pyx_memoryview_obj *__pyx_v_result = 0;
27194  PyObject *__pyx_r = NULL;
27195  __Pyx_RefNannyDeclarations
27196  PyObject *__pyx_t_1 = NULL;
27197  PyObject *__pyx_t_2 = NULL;
27198  PyObject *__pyx_t_3 = NULL;
27199  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
27200 
27201  /* "View.MemoryView":658
27202  * @cname('__pyx_memoryview_new')
27203  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
27204  * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
27205  * result.typeinfo = typeinfo
27206  * return result
27207  */
27208  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
27209  __Pyx_GOTREF(__pyx_t_1);
27210  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
27211  __Pyx_GOTREF(__pyx_t_2);
27212  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error)
27213  __Pyx_GOTREF(__pyx_t_3);
27214  __Pyx_INCREF(__pyx_v_o);
27215  __Pyx_GIVEREF(__pyx_v_o);
27216  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
27217  __Pyx_GIVEREF(__pyx_t_1);
27218  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
27219  __Pyx_GIVEREF(__pyx_t_2);
27220  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
27221  __pyx_t_1 = 0;
27222  __pyx_t_2 = 0;
27223  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
27224  __Pyx_GOTREF(__pyx_t_2);
27225  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27226  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
27227  __pyx_t_2 = 0;
27228 
27229  /* "View.MemoryView":659
27230  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
27231  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27232  * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
27233  * return result
27234  *
27235  */
27236  __pyx_v_result->typeinfo = __pyx_v_typeinfo;
27237 
27238  /* "View.MemoryView":660
27239  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27240  * result.typeinfo = typeinfo
27241  * return result # <<<<<<<<<<<<<<
27242  *
27243  * @cname('__pyx_memoryview_check')
27244  */
27245  __Pyx_XDECREF(__pyx_r);
27246  __Pyx_INCREF(((PyObject *)__pyx_v_result));
27247  __pyx_r = ((PyObject *)__pyx_v_result);
27248  goto __pyx_L0;
27249 
27250  /* "View.MemoryView":657
27251  *
27252  * @cname('__pyx_memoryview_new')
27253  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
27254  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27255  * result.typeinfo = typeinfo
27256  */
27257 
27258  /* function exit code */
27259  __pyx_L1_error:;
27260  __Pyx_XDECREF(__pyx_t_1);
27261  __Pyx_XDECREF(__pyx_t_2);
27262  __Pyx_XDECREF(__pyx_t_3);
27263  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
27264  __pyx_r = 0;
27265  __pyx_L0:;
27266  __Pyx_XDECREF((PyObject *)__pyx_v_result);
27267  __Pyx_XGIVEREF(__pyx_r);
27268  __Pyx_RefNannyFinishContext();
27269  return __pyx_r;
27270 }
27271 
27272 /* "View.MemoryView":663
27273  *
27274  * @cname('__pyx_memoryview_check')
27275  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
27276  * return isinstance(o, memoryview)
27277  *
27278  */
27279 
27280 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
27281  int __pyx_r;
27282  __Pyx_RefNannyDeclarations
27283  int __pyx_t_1;
27284  __Pyx_RefNannySetupContext("memoryview_check", 0);
27285 
27286  /* "View.MemoryView":664
27287  * @cname('__pyx_memoryview_check')
27288  * cdef inline bint memoryview_check(object o):
27289  * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
27290  *
27291  * cdef tuple _unellipsify(object index, int ndim):
27292  */
27293  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
27294  __pyx_r = __pyx_t_1;
27295  goto __pyx_L0;
27296 
27297  /* "View.MemoryView":663
27298  *
27299  * @cname('__pyx_memoryview_check')
27300  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
27301  * return isinstance(o, memoryview)
27302  *
27303  */
27304 
27305  /* function exit code */
27306  __pyx_L0:;
27307  __Pyx_RefNannyFinishContext();
27308  return __pyx_r;
27309 }
27310 
27311 /* "View.MemoryView":666
27312  * return isinstance(o, memoryview)
27313  *
27314  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
27315  * """
27316  * Replace all ellipses with full slices and fill incomplete indices with
27317  */
27318 
27319 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
27320  PyObject *__pyx_v_tup = NULL;
27321  PyObject *__pyx_v_result = NULL;
27322  int __pyx_v_have_slices;
27323  int __pyx_v_seen_ellipsis;
27324  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
27325  PyObject *__pyx_v_item = NULL;
27326  Py_ssize_t __pyx_v_nslices;
27327  PyObject *__pyx_r = NULL;
27328  __Pyx_RefNannyDeclarations
27329  int __pyx_t_1;
27330  int __pyx_t_2;
27331  PyObject *__pyx_t_3 = NULL;
27332  PyObject *__pyx_t_4 = NULL;
27333  Py_ssize_t __pyx_t_5;
27334  PyObject *(*__pyx_t_6)(PyObject *);
27335  PyObject *__pyx_t_7 = NULL;
27336  Py_ssize_t __pyx_t_8;
27337  int __pyx_t_9;
27338  int __pyx_t_10;
27339  PyObject *__pyx_t_11 = NULL;
27340  __Pyx_RefNannySetupContext("_unellipsify", 0);
27341 
27342  /* "View.MemoryView":671
27343  * full slices.
27344  * """
27345  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
27346  * tup = (index,)
27347  * else:
27348  */
27349  __pyx_t_1 = PyTuple_Check(__pyx_v_index);
27350  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
27351  if (__pyx_t_2) {
27352 
27353  /* "View.MemoryView":672
27354  * """
27355  * if not isinstance(index, tuple):
27356  * tup = (index,) # <<<<<<<<<<<<<<
27357  * else:
27358  * tup = index
27359  */
27360  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
27361  __Pyx_GOTREF(__pyx_t_3);
27362  __Pyx_INCREF(__pyx_v_index);
27363  __Pyx_GIVEREF(__pyx_v_index);
27364  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
27365  __pyx_v_tup = __pyx_t_3;
27366  __pyx_t_3 = 0;
27367 
27368  /* "View.MemoryView":671
27369  * full slices.
27370  * """
27371  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
27372  * tup = (index,)
27373  * else:
27374  */
27375  goto __pyx_L3;
27376  }
27377 
27378  /* "View.MemoryView":674
27379  * tup = (index,)
27380  * else:
27381  * tup = index # <<<<<<<<<<<<<<
27382  *
27383  * result = []
27384  */
27385  /*else*/ {
27386  __Pyx_INCREF(__pyx_v_index);
27387  __pyx_v_tup = __pyx_v_index;
27388  }
27389  __pyx_L3:;
27390 
27391  /* "View.MemoryView":676
27392  * tup = index
27393  *
27394  * result = [] # <<<<<<<<<<<<<<
27395  * have_slices = False
27396  * seen_ellipsis = False
27397  */
27398  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
27399  __Pyx_GOTREF(__pyx_t_3);
27400  __pyx_v_result = ((PyObject*)__pyx_t_3);
27401  __pyx_t_3 = 0;
27402 
27403  /* "View.MemoryView":677
27404  *
27405  * result = []
27406  * have_slices = False # <<<<<<<<<<<<<<
27407  * seen_ellipsis = False
27408  * for idx, item in enumerate(tup):
27409  */
27410  __pyx_v_have_slices = 0;
27411 
27412  /* "View.MemoryView":678
27413  * result = []
27414  * have_slices = False
27415  * seen_ellipsis = False # <<<<<<<<<<<<<<
27416  * for idx, item in enumerate(tup):
27417  * if item is Ellipsis:
27418  */
27419  __pyx_v_seen_ellipsis = 0;
27420 
27421  /* "View.MemoryView":679
27422  * have_slices = False
27423  * seen_ellipsis = False
27424  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
27425  * if item is Ellipsis:
27426  * if not seen_ellipsis:
27427  */
27428  __Pyx_INCREF(__pyx_int_0);
27429  __pyx_t_3 = __pyx_int_0;
27430  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
27431  __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
27432  __pyx_t_6 = NULL;
27433  } else {
27434  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
27435  __Pyx_GOTREF(__pyx_t_4);
27436  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
27437  }
27438  for (;;) {
27439  if (likely(!__pyx_t_6)) {
27440  if (likely(PyList_CheckExact(__pyx_t_4))) {
27441  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
27442  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27443  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
27444  #else
27445  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
27446  __Pyx_GOTREF(__pyx_t_7);
27447  #endif
27448  } else {
27449  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
27450  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27451  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
27452  #else
27453  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
27454  __Pyx_GOTREF(__pyx_t_7);
27455  #endif
27456  }
27457  } else {
27458  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
27459  if (unlikely(!__pyx_t_7)) {
27460  PyObject* exc_type = PyErr_Occurred();
27461  if (exc_type) {
27462  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
27463  else __PYX_ERR(0, 679, __pyx_L1_error)
27464  }
27465  break;
27466  }
27467  __Pyx_GOTREF(__pyx_t_7);
27468  }
27469  __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
27470  __pyx_t_7 = 0;
27471  __Pyx_INCREF(__pyx_t_3);
27472  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
27473  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
27474  __Pyx_GOTREF(__pyx_t_7);
27475  __Pyx_DECREF(__pyx_t_3);
27476  __pyx_t_3 = __pyx_t_7;
27477  __pyx_t_7 = 0;
27478 
27479  /* "View.MemoryView":680
27480  * seen_ellipsis = False
27481  * for idx, item in enumerate(tup):
27482  * if item is Ellipsis: # <<<<<<<<<<<<<<
27483  * if not seen_ellipsis:
27484  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27485  */
27486  __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
27487  __pyx_t_1 = (__pyx_t_2 != 0);
27488  if (__pyx_t_1) {
27489 
27490  /* "View.MemoryView":681
27491  * for idx, item in enumerate(tup):
27492  * if item is Ellipsis:
27493  * if not seen_ellipsis: # <<<<<<<<<<<<<<
27494  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27495  * seen_ellipsis = True
27496  */
27497  __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
27498  if (__pyx_t_1) {
27499 
27500  /* "View.MemoryView":682
27501  * if item is Ellipsis:
27502  * if not seen_ellipsis:
27503  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
27504  * seen_ellipsis = True
27505  * else:
27506  */
27507  __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
27508  __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
27509  __Pyx_GOTREF(__pyx_t_7);
27510  { Py_ssize_t __pyx_temp;
27511  for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
27512  __Pyx_INCREF(__pyx_slice__27);
27513  __Pyx_GIVEREF(__pyx_slice__27);
27514  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__27);
27515  }
27516  }
27517  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
27518  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27519 
27520  /* "View.MemoryView":683
27521  * if not seen_ellipsis:
27522  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27523  * seen_ellipsis = True # <<<<<<<<<<<<<<
27524  * else:
27525  * result.append(slice(None))
27526  */
27527  __pyx_v_seen_ellipsis = 1;
27528 
27529  /* "View.MemoryView":681
27530  * for idx, item in enumerate(tup):
27531  * if item is Ellipsis:
27532  * if not seen_ellipsis: # <<<<<<<<<<<<<<
27533  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27534  * seen_ellipsis = True
27535  */
27536  goto __pyx_L7;
27537  }
27538 
27539  /* "View.MemoryView":685
27540  * seen_ellipsis = True
27541  * else:
27542  * result.append(slice(None)) # <<<<<<<<<<<<<<
27543  * have_slices = True
27544  * else:
27545  */
27546  /*else*/ {
27547  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__27); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)
27548  }
27549  __pyx_L7:;
27550 
27551  /* "View.MemoryView":686
27552  * else:
27553  * result.append(slice(None))
27554  * have_slices = True # <<<<<<<<<<<<<<
27555  * else:
27556  * if not isinstance(item, slice) and not PyIndex_Check(item):
27557  */
27558  __pyx_v_have_slices = 1;
27559 
27560  /* "View.MemoryView":680
27561  * seen_ellipsis = False
27562  * for idx, item in enumerate(tup):
27563  * if item is Ellipsis: # <<<<<<<<<<<<<<
27564  * if not seen_ellipsis:
27565  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27566  */
27567  goto __pyx_L6;
27568  }
27569 
27570  /* "View.MemoryView":688
27571  * have_slices = True
27572  * else:
27573  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
27574  * raise TypeError("Cannot index with type '%s'" % type(item))
27575  *
27576  */
27577  /*else*/ {
27578  __pyx_t_2 = PySlice_Check(__pyx_v_item);
27579  __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
27580  if (__pyx_t_10) {
27581  } else {
27582  __pyx_t_1 = __pyx_t_10;
27583  goto __pyx_L9_bool_binop_done;
27584  }
27585  __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
27586  __pyx_t_1 = __pyx_t_10;
27587  __pyx_L9_bool_binop_done:;
27588  if (unlikely(__pyx_t_1)) {
27589 
27590  /* "View.MemoryView":689
27591  * else:
27592  * if not isinstance(item, slice) and not PyIndex_Check(item):
27593  * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
27594  *
27595  * have_slices = have_slices or isinstance(item, slice)
27596  */
27597  __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error)
27598  __Pyx_GOTREF(__pyx_t_7);
27599  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 689, __pyx_L1_error)
27600  __Pyx_GOTREF(__pyx_t_11);
27601  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27602  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
27603  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
27604  __PYX_ERR(0, 689, __pyx_L1_error)
27605 
27606  /* "View.MemoryView":688
27607  * have_slices = True
27608  * else:
27609  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
27610  * raise TypeError("Cannot index with type '%s'" % type(item))
27611  *
27612  */
27613  }
27614 
27615  /* "View.MemoryView":691
27616  * raise TypeError("Cannot index with type '%s'" % type(item))
27617  *
27618  * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
27619  * result.append(item)
27620  *
27621  */
27622  __pyx_t_10 = (__pyx_v_have_slices != 0);
27623  if (!__pyx_t_10) {
27624  } else {
27625  __pyx_t_1 = __pyx_t_10;
27626  goto __pyx_L11_bool_binop_done;
27627  }
27628  __pyx_t_10 = PySlice_Check(__pyx_v_item);
27629  __pyx_t_2 = (__pyx_t_10 != 0);
27630  __pyx_t_1 = __pyx_t_2;
27631  __pyx_L11_bool_binop_done:;
27632  __pyx_v_have_slices = __pyx_t_1;
27633 
27634  /* "View.MemoryView":692
27635  *
27636  * have_slices = have_slices or isinstance(item, slice)
27637  * result.append(item) # <<<<<<<<<<<<<<
27638  *
27639  * nslices = ndim - len(result)
27640  */
27641  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 692, __pyx_L1_error)
27642  }
27643  __pyx_L6:;
27644 
27645  /* "View.MemoryView":679
27646  * have_slices = False
27647  * seen_ellipsis = False
27648  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
27649  * if item is Ellipsis:
27650  * if not seen_ellipsis:
27651  */
27652  }
27653  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27654  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27655 
27656  /* "View.MemoryView":694
27657  * result.append(item)
27658  *
27659  * nslices = ndim - len(result) # <<<<<<<<<<<<<<
27660  * if nslices:
27661  * result.extend([slice(None)] * nslices)
27662  */
27663  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 694, __pyx_L1_error)
27664  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
27665 
27666  /* "View.MemoryView":695
27667  *
27668  * nslices = ndim - len(result)
27669  * if nslices: # <<<<<<<<<<<<<<
27670  * result.extend([slice(None)] * nslices)
27671  *
27672  */
27673  __pyx_t_1 = (__pyx_v_nslices != 0);
27674  if (__pyx_t_1) {
27675 
27676  /* "View.MemoryView":696
27677  * nslices = ndim - len(result)
27678  * if nslices:
27679  * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
27680  *
27681  * return have_slices or nslices, tuple(result)
27682  */
27683  __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
27684  __Pyx_GOTREF(__pyx_t_3);
27685  { Py_ssize_t __pyx_temp;
27686  for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
27687  __Pyx_INCREF(__pyx_slice__27);
27688  __Pyx_GIVEREF(__pyx_slice__27);
27689  PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__27);
27690  }
27691  }
27692  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L1_error)
27693  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27694 
27695  /* "View.MemoryView":695
27696  *
27697  * nslices = ndim - len(result)
27698  * if nslices: # <<<<<<<<<<<<<<
27699  * result.extend([slice(None)] * nslices)
27700  *
27701  */
27702  }
27703 
27704  /* "View.MemoryView":698
27705  * result.extend([slice(None)] * nslices)
27706  *
27707  * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
27708  *
27709  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27710  */
27711  __Pyx_XDECREF(__pyx_r);
27712  if (!__pyx_v_have_slices) {
27713  } else {
27714  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
27715  __Pyx_GOTREF(__pyx_t_4);
27716  __pyx_t_3 = __pyx_t_4;
27717  __pyx_t_4 = 0;
27718  goto __pyx_L14_bool_binop_done;
27719  }
27720  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
27721  __Pyx_GOTREF(__pyx_t_4);
27722  __pyx_t_3 = __pyx_t_4;
27723  __pyx_t_4 = 0;
27724  __pyx_L14_bool_binop_done:;
27725  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
27726  __Pyx_GOTREF(__pyx_t_4);
27727  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 698, __pyx_L1_error)
27728  __Pyx_GOTREF(__pyx_t_11);
27729  __Pyx_GIVEREF(__pyx_t_3);
27730  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
27731  __Pyx_GIVEREF(__pyx_t_4);
27732  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
27733  __pyx_t_3 = 0;
27734  __pyx_t_4 = 0;
27735  __pyx_r = ((PyObject*)__pyx_t_11);
27736  __pyx_t_11 = 0;
27737  goto __pyx_L0;
27738 
27739  /* "View.MemoryView":666
27740  * return isinstance(o, memoryview)
27741  *
27742  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
27743  * """
27744  * Replace all ellipses with full slices and fill incomplete indices with
27745  */
27746 
27747  /* function exit code */
27748  __pyx_L1_error:;
27749  __Pyx_XDECREF(__pyx_t_3);
27750  __Pyx_XDECREF(__pyx_t_4);
27751  __Pyx_XDECREF(__pyx_t_7);
27752  __Pyx_XDECREF(__pyx_t_11);
27753  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
27754  __pyx_r = 0;
27755  __pyx_L0:;
27756  __Pyx_XDECREF(__pyx_v_tup);
27757  __Pyx_XDECREF(__pyx_v_result);
27758  __Pyx_XDECREF(__pyx_v_idx);
27759  __Pyx_XDECREF(__pyx_v_item);
27760  __Pyx_XGIVEREF(__pyx_r);
27761  __Pyx_RefNannyFinishContext();
27762  return __pyx_r;
27763 }
27764 
27765 /* "View.MemoryView":700
27766  * return have_slices or nslices, tuple(result)
27767  *
27768  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
27769  * for suboffset in suboffsets[:ndim]:
27770  * if suboffset >= 0:
27771  */
27772 
27773 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
27774  Py_ssize_t __pyx_v_suboffset;
27775  PyObject *__pyx_r = NULL;
27776  __Pyx_RefNannyDeclarations
27777  Py_ssize_t *__pyx_t_1;
27778  Py_ssize_t *__pyx_t_2;
27779  Py_ssize_t *__pyx_t_3;
27780  int __pyx_t_4;
27781  PyObject *__pyx_t_5 = NULL;
27782  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
27783 
27784  /* "View.MemoryView":701
27785  *
27786  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27787  * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
27788  * if suboffset >= 0:
27789  * raise ValueError("Indirect dimensions not supported")
27790  */
27791  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
27792  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
27793  __pyx_t_1 = __pyx_t_3;
27794  __pyx_v_suboffset = (__pyx_t_1[0]);
27795 
27796  /* "View.MemoryView":702
27797  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27798  * for suboffset in suboffsets[:ndim]:
27799  * if suboffset >= 0: # <<<<<<<<<<<<<<
27800  * raise ValueError("Indirect dimensions not supported")
27801  *
27802  */
27803  __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
27804  if (unlikely(__pyx_t_4)) {
27805 
27806  /* "View.MemoryView":703
27807  * for suboffset in suboffsets[:ndim]:
27808  * if suboffset >= 0:
27809  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
27810  *
27811  *
27812  */
27813  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
27814  __Pyx_GOTREF(__pyx_t_5);
27815  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
27816  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27817  __PYX_ERR(0, 703, __pyx_L1_error)
27818 
27819  /* "View.MemoryView":702
27820  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27821  * for suboffset in suboffsets[:ndim]:
27822  * if suboffset >= 0: # <<<<<<<<<<<<<<
27823  * raise ValueError("Indirect dimensions not supported")
27824  *
27825  */
27826  }
27827  }
27828 
27829  /* "View.MemoryView":700
27830  * return have_slices or nslices, tuple(result)
27831  *
27832  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
27833  * for suboffset in suboffsets[:ndim]:
27834  * if suboffset >= 0:
27835  */
27836 
27837  /* function exit code */
27838  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27839  goto __pyx_L0;
27840  __pyx_L1_error:;
27841  __Pyx_XDECREF(__pyx_t_5);
27842  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
27843  __pyx_r = 0;
27844  __pyx_L0:;
27845  __Pyx_XGIVEREF(__pyx_r);
27846  __Pyx_RefNannyFinishContext();
27847  return __pyx_r;
27848 }
27849 
27850 /* "View.MemoryView":710
27851  *
27852  * @cname('__pyx_memview_slice')
27853  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
27854  * cdef int new_ndim = 0, suboffset_dim = -1, dim
27855  * cdef bint negative_step
27856  */
27857 
27858 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
27859  int __pyx_v_new_ndim;
27860  int __pyx_v_suboffset_dim;
27861  int __pyx_v_dim;
27862  __Pyx_memviewslice __pyx_v_src;
27863  __Pyx_memviewslice __pyx_v_dst;
27864  __Pyx_memviewslice *__pyx_v_p_src;
27865  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
27866  __Pyx_memviewslice *__pyx_v_p_dst;
27867  int *__pyx_v_p_suboffset_dim;
27868  Py_ssize_t __pyx_v_start;
27869  Py_ssize_t __pyx_v_stop;
27870  Py_ssize_t __pyx_v_step;
27871  int __pyx_v_have_start;
27872  int __pyx_v_have_stop;
27873  int __pyx_v_have_step;
27874  PyObject *__pyx_v_index = NULL;
27875  struct __pyx_memoryview_obj *__pyx_r = NULL;
27876  __Pyx_RefNannyDeclarations
27877  int __pyx_t_1;
27878  int __pyx_t_2;
27879  PyObject *__pyx_t_3 = NULL;
27880  struct __pyx_memoryview_obj *__pyx_t_4;
27881  char *__pyx_t_5;
27882  int __pyx_t_6;
27883  Py_ssize_t __pyx_t_7;
27884  PyObject *(*__pyx_t_8)(PyObject *);
27885  PyObject *__pyx_t_9 = NULL;
27886  Py_ssize_t __pyx_t_10;
27887  int __pyx_t_11;
27888  Py_ssize_t __pyx_t_12;
27889  __Pyx_RefNannySetupContext("memview_slice", 0);
27890 
27891  /* "View.MemoryView":711
27892  * @cname('__pyx_memview_slice')
27893  * cdef memoryview memview_slice(memoryview memview, object indices):
27894  * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
27895  * cdef bint negative_step
27896  * cdef __Pyx_memviewslice src, dst
27897  */
27898  __pyx_v_new_ndim = 0;
27899  __pyx_v_suboffset_dim = -1;
27900 
27901  /* "View.MemoryView":718
27902  *
27903  *
27904  * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
27905  *
27906  * cdef _memoryviewslice memviewsliceobj
27907  */
27908  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
27909 
27910  /* "View.MemoryView":722
27911  * cdef _memoryviewslice memviewsliceobj
27912  *
27913  * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
27914  *
27915  * if isinstance(memview, _memoryviewslice):
27916  */
27917  #ifndef CYTHON_WITHOUT_ASSERTIONS
27918  if (unlikely(!Py_OptimizeFlag)) {
27919  if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
27920  PyErr_SetNone(PyExc_AssertionError);
27921  __PYX_ERR(0, 722, __pyx_L1_error)
27922  }
27923  }
27924  #endif
27925 
27926  /* "View.MemoryView":724
27927  * assert memview.view.ndim > 0
27928  *
27929  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27930  * memviewsliceobj = memview
27931  * p_src = &memviewsliceobj.from_slice
27932  */
27933  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
27934  __pyx_t_2 = (__pyx_t_1 != 0);
27935  if (__pyx_t_2) {
27936 
27937  /* "View.MemoryView":725
27938  *
27939  * if isinstance(memview, _memoryviewslice):
27940  * memviewsliceobj = memview # <<<<<<<<<<<<<<
27941  * p_src = &memviewsliceobj.from_slice
27942  * else:
27943  */
27944  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 725, __pyx_L1_error)
27945  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
27946  __Pyx_INCREF(__pyx_t_3);
27947  __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
27948  __pyx_t_3 = 0;
27949 
27950  /* "View.MemoryView":726
27951  * if isinstance(memview, _memoryviewslice):
27952  * memviewsliceobj = memview
27953  * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
27954  * else:
27955  * slice_copy(memview, &src)
27956  */
27957  __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
27958 
27959  /* "View.MemoryView":724
27960  * assert memview.view.ndim > 0
27961  *
27962  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27963  * memviewsliceobj = memview
27964  * p_src = &memviewsliceobj.from_slice
27965  */
27966  goto __pyx_L3;
27967  }
27968 
27969  /* "View.MemoryView":728
27970  * p_src = &memviewsliceobj.from_slice
27971  * else:
27972  * slice_copy(memview, &src) # <<<<<<<<<<<<<<
27973  * p_src = &src
27974  *
27975  */
27976  /*else*/ {
27977  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
27978 
27979  /* "View.MemoryView":729
27980  * else:
27981  * slice_copy(memview, &src)
27982  * p_src = &src # <<<<<<<<<<<<<<
27983  *
27984  *
27985  */
27986  __pyx_v_p_src = (&__pyx_v_src);
27987  }
27988  __pyx_L3:;
27989 
27990  /* "View.MemoryView":735
27991  *
27992  *
27993  * dst.memview = p_src.memview # <<<<<<<<<<<<<<
27994  * dst.data = p_src.data
27995  *
27996  */
27997  __pyx_t_4 = __pyx_v_p_src->memview;
27998  __pyx_v_dst.memview = __pyx_t_4;
27999 
28000  /* "View.MemoryView":736
28001  *
28002  * dst.memview = p_src.memview
28003  * dst.data = p_src.data # <<<<<<<<<<<<<<
28004  *
28005  *
28006  */
28007  __pyx_t_5 = __pyx_v_p_src->data;
28008  __pyx_v_dst.data = __pyx_t_5;
28009 
28010  /* "View.MemoryView":741
28011  *
28012  *
28013  * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
28014  * cdef int *p_suboffset_dim = &suboffset_dim
28015  * cdef Py_ssize_t start, stop, step
28016  */
28017  __pyx_v_p_dst = (&__pyx_v_dst);
28018 
28019  /* "View.MemoryView":742
28020  *
28021  * cdef __Pyx_memviewslice *p_dst = &dst
28022  * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
28023  * cdef Py_ssize_t start, stop, step
28024  * cdef bint have_start, have_stop, have_step
28025  */
28026  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
28027 
28028  /* "View.MemoryView":746
28029  * cdef bint have_start, have_stop, have_step
28030  *
28031  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
28032  * if PyIndex_Check(index):
28033  * slice_memviewslice(
28034  */
28035  __pyx_t_6 = 0;
28036  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
28037  __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
28038  __pyx_t_8 = NULL;
28039  } else {
28040  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
28041  __Pyx_GOTREF(__pyx_t_3);
28042  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 746, __pyx_L1_error)
28043  }
28044  for (;;) {
28045  if (likely(!__pyx_t_8)) {
28046  if (likely(PyList_CheckExact(__pyx_t_3))) {
28047  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
28048  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
28049  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
28050  #else
28051  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
28052  __Pyx_GOTREF(__pyx_t_9);
28053  #endif
28054  } else {
28055  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
28056  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
28057  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
28058  #else
28059  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
28060  __Pyx_GOTREF(__pyx_t_9);
28061  #endif
28062  }
28063  } else {
28064  __pyx_t_9 = __pyx_t_8(__pyx_t_3);
28065  if (unlikely(!__pyx_t_9)) {
28066  PyObject* exc_type = PyErr_Occurred();
28067  if (exc_type) {
28068  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
28069  else __PYX_ERR(0, 746, __pyx_L1_error)
28070  }
28071  break;
28072  }
28073  __Pyx_GOTREF(__pyx_t_9);
28074  }
28075  __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
28076  __pyx_t_9 = 0;
28077  __pyx_v_dim = __pyx_t_6;
28078  __pyx_t_6 = (__pyx_t_6 + 1);
28079 
28080  /* "View.MemoryView":747
28081  *
28082  * for dim, index in enumerate(indices):
28083  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
28084  * slice_memviewslice(
28085  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28086  */
28087  __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
28088  if (__pyx_t_2) {
28089 
28090  /* "View.MemoryView":751
28091  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28092  * dim, new_ndim, p_suboffset_dim,
28093  * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
28094  * 0, 0, 0, # have_{start,stop,step}
28095  * False)
28096  */
28097  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 751, __pyx_L1_error)
28098 
28099  /* "View.MemoryView":748
28100  * for dim, index in enumerate(indices):
28101  * if PyIndex_Check(index):
28102  * slice_memviewslice( # <<<<<<<<<<<<<<
28103  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28104  * dim, new_ndim, p_suboffset_dim,
28105  */
28106  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 748, __pyx_L1_error)
28107 
28108  /* "View.MemoryView":747
28109  *
28110  * for dim, index in enumerate(indices):
28111  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
28112  * slice_memviewslice(
28113  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28114  */
28115  goto __pyx_L6;
28116  }
28117 
28118  /* "View.MemoryView":754
28119  * 0, 0, 0, # have_{start,stop,step}
28120  * False)
28121  * elif index is None: # <<<<<<<<<<<<<<
28122  * p_dst.shape[new_ndim] = 1
28123  * p_dst.strides[new_ndim] = 0
28124  */
28125  __pyx_t_2 = (__pyx_v_index == Py_None);
28126  __pyx_t_1 = (__pyx_t_2 != 0);
28127  if (__pyx_t_1) {
28128 
28129  /* "View.MemoryView":755
28130  * False)
28131  * elif index is None:
28132  * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
28133  * p_dst.strides[new_ndim] = 0
28134  * p_dst.suboffsets[new_ndim] = -1
28135  */
28136  (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
28137 
28138  /* "View.MemoryView":756
28139  * elif index is None:
28140  * p_dst.shape[new_ndim] = 1
28141  * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
28142  * p_dst.suboffsets[new_ndim] = -1
28143  * new_ndim += 1
28144  */
28145  (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
28146 
28147  /* "View.MemoryView":757
28148  * p_dst.shape[new_ndim] = 1
28149  * p_dst.strides[new_ndim] = 0
28150  * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
28151  * new_ndim += 1
28152  * else:
28153  */
28154  (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
28155 
28156  /* "View.MemoryView":758
28157  * p_dst.strides[new_ndim] = 0
28158  * p_dst.suboffsets[new_ndim] = -1
28159  * new_ndim += 1 # <<<<<<<<<<<<<<
28160  * else:
28161  * start = index.start or 0
28162  */
28163  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
28164 
28165  /* "View.MemoryView":754
28166  * 0, 0, 0, # have_{start,stop,step}
28167  * False)
28168  * elif index is None: # <<<<<<<<<<<<<<
28169  * p_dst.shape[new_ndim] = 1
28170  * p_dst.strides[new_ndim] = 0
28171  */
28172  goto __pyx_L6;
28173  }
28174 
28175  /* "View.MemoryView":760
28176  * new_ndim += 1
28177  * else:
28178  * start = index.start or 0 # <<<<<<<<<<<<<<
28179  * stop = index.stop or 0
28180  * step = index.step or 0
28181  */
28182  /*else*/ {
28183  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L1_error)
28184  __Pyx_GOTREF(__pyx_t_9);
28185  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 760, __pyx_L1_error)
28186  if (!__pyx_t_1) {
28187  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28188  } else {
28189  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L1_error)
28190  __pyx_t_10 = __pyx_t_12;
28191  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28192  goto __pyx_L7_bool_binop_done;
28193  }
28194  __pyx_t_10 = 0;
28195  __pyx_L7_bool_binop_done:;
28196  __pyx_v_start = __pyx_t_10;
28197 
28198  /* "View.MemoryView":761
28199  * else:
28200  * start = index.start or 0
28201  * stop = index.stop or 0 # <<<<<<<<<<<<<<
28202  * step = index.step or 0
28203  *
28204  */
28205  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 761, __pyx_L1_error)
28206  __Pyx_GOTREF(__pyx_t_9);
28207  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
28208  if (!__pyx_t_1) {
28209  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28210  } else {
28211  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
28212  __pyx_t_10 = __pyx_t_12;
28213  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28214  goto __pyx_L9_bool_binop_done;
28215  }
28216  __pyx_t_10 = 0;
28217  __pyx_L9_bool_binop_done:;
28218  __pyx_v_stop = __pyx_t_10;
28219 
28220  /* "View.MemoryView":762
28221  * start = index.start or 0
28222  * stop = index.stop or 0
28223  * step = index.step or 0 # <<<<<<<<<<<<<<
28224  *
28225  * have_start = index.start is not None
28226  */
28227  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error)
28228  __Pyx_GOTREF(__pyx_t_9);
28229  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
28230  if (!__pyx_t_1) {
28231  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28232  } else {
28233  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
28234  __pyx_t_10 = __pyx_t_12;
28235  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28236  goto __pyx_L11_bool_binop_done;
28237  }
28238  __pyx_t_10 = 0;
28239  __pyx_L11_bool_binop_done:;
28240  __pyx_v_step = __pyx_t_10;
28241 
28242  /* "View.MemoryView":764
28243  * step = index.step or 0
28244  *
28245  * have_start = index.start is not None # <<<<<<<<<<<<<<
28246  * have_stop = index.stop is not None
28247  * have_step = index.step is not None
28248  */
28249  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 764, __pyx_L1_error)
28250  __Pyx_GOTREF(__pyx_t_9);
28251  __pyx_t_1 = (__pyx_t_9 != Py_None);
28252  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28253  __pyx_v_have_start = __pyx_t_1;
28254 
28255  /* "View.MemoryView":765
28256  *
28257  * have_start = index.start is not None
28258  * have_stop = index.stop is not None # <<<<<<<<<<<<<<
28259  * have_step = index.step is not None
28260  *
28261  */
28262  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L1_error)
28263  __Pyx_GOTREF(__pyx_t_9);
28264  __pyx_t_1 = (__pyx_t_9 != Py_None);
28265  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28266  __pyx_v_have_stop = __pyx_t_1;
28267 
28268  /* "View.MemoryView":766
28269  * have_start = index.start is not None
28270  * have_stop = index.stop is not None
28271  * have_step = index.step is not None # <<<<<<<<<<<<<<
28272  *
28273  * slice_memviewslice(
28274  */
28275  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L1_error)
28276  __Pyx_GOTREF(__pyx_t_9);
28277  __pyx_t_1 = (__pyx_t_9 != Py_None);
28278  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28279  __pyx_v_have_step = __pyx_t_1;
28280 
28281  /* "View.MemoryView":768
28282  * have_step = index.step is not None
28283  *
28284  * slice_memviewslice( # <<<<<<<<<<<<<<
28285  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28286  * dim, new_ndim, p_suboffset_dim,
28287  */
28288  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 768, __pyx_L1_error)
28289 
28290  /* "View.MemoryView":774
28291  * have_start, have_stop, have_step,
28292  * True)
28293  * new_ndim += 1 # <<<<<<<<<<<<<<
28294  *
28295  * if isinstance(memview, _memoryviewslice):
28296  */
28297  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
28298  }
28299  __pyx_L6:;
28300 
28301  /* "View.MemoryView":746
28302  * cdef bint have_start, have_stop, have_step
28303  *
28304  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
28305  * if PyIndex_Check(index):
28306  * slice_memviewslice(
28307  */
28308  }
28309  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28310 
28311  /* "View.MemoryView":776
28312  * new_ndim += 1
28313  *
28314  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
28315  * return memoryview_fromslice(dst, new_ndim,
28316  * memviewsliceobj.to_object_func,
28317  */
28318  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
28319  __pyx_t_2 = (__pyx_t_1 != 0);
28320  if (__pyx_t_2) {
28321 
28322  /* "View.MemoryView":777
28323  *
28324  * if isinstance(memview, _memoryviewslice):
28325  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
28326  * memviewsliceobj.to_object_func,
28327  * memviewsliceobj.to_dtype_func,
28328  */
28329  __Pyx_XDECREF(((PyObject *)__pyx_r));
28330 
28331  /* "View.MemoryView":778
28332  * if isinstance(memview, _memoryviewslice):
28333  * return memoryview_fromslice(dst, new_ndim,
28334  * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
28335  * memviewsliceobj.to_dtype_func,
28336  * memview.dtype_is_object)
28337  */
28338  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 778, __pyx_L1_error) }
28339 
28340  /* "View.MemoryView":779
28341  * return memoryview_fromslice(dst, new_ndim,
28342  * memviewsliceobj.to_object_func,
28343  * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
28344  * memview.dtype_is_object)
28345  * else:
28346  */
28347  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 779, __pyx_L1_error) }
28348 
28349  /* "View.MemoryView":777
28350  *
28351  * if isinstance(memview, _memoryviewslice):
28352  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
28353  * memviewsliceobj.to_object_func,
28354  * memviewsliceobj.to_dtype_func,
28355  */
28356  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
28357  __Pyx_GOTREF(__pyx_t_3);
28358  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 777, __pyx_L1_error)
28359  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
28360  __pyx_t_3 = 0;
28361  goto __pyx_L0;
28362 
28363  /* "View.MemoryView":776
28364  * new_ndim += 1
28365  *
28366  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
28367  * return memoryview_fromslice(dst, new_ndim,
28368  * memviewsliceobj.to_object_func,
28369  */
28370  }
28371 
28372  /* "View.MemoryView":782
28373  * memview.dtype_is_object)
28374  * else:
28375  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
28376  * memview.dtype_is_object)
28377  *
28378  */
28379  /*else*/ {
28380  __Pyx_XDECREF(((PyObject *)__pyx_r));
28381 
28382  /* "View.MemoryView":783
28383  * else:
28384  * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
28385  * memview.dtype_is_object) # <<<<<<<<<<<<<<
28386  *
28387  *
28388  */
28389  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
28390  __Pyx_GOTREF(__pyx_t_3);
28391 
28392  /* "View.MemoryView":782
28393  * memview.dtype_is_object)
28394  * else:
28395  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
28396  * memview.dtype_is_object)
28397  *
28398  */
28399  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 782, __pyx_L1_error)
28400  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
28401  __pyx_t_3 = 0;
28402  goto __pyx_L0;
28403  }
28404 
28405  /* "View.MemoryView":710
28406  *
28407  * @cname('__pyx_memview_slice')
28408  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
28409  * cdef int new_ndim = 0, suboffset_dim = -1, dim
28410  * cdef bint negative_step
28411  */
28412 
28413  /* function exit code */
28414  __pyx_L1_error:;
28415  __Pyx_XDECREF(__pyx_t_3);
28416  __Pyx_XDECREF(__pyx_t_9);
28417  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
28418  __pyx_r = 0;
28419  __pyx_L0:;
28420  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
28421  __Pyx_XDECREF(__pyx_v_index);
28422  __Pyx_XGIVEREF((PyObject *)__pyx_r);
28423  __Pyx_RefNannyFinishContext();
28424  return __pyx_r;
28425 }
28426 
28427 /* "View.MemoryView":807
28428  *
28429  * @cname('__pyx_memoryview_slice_memviewslice')
28430  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
28431  * __Pyx_memviewslice *dst,
28432  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
28433  */
28434 
28435 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
28436  Py_ssize_t __pyx_v_new_shape;
28437  int __pyx_v_negative_step;
28438  int __pyx_r;
28439  int __pyx_t_1;
28440  int __pyx_t_2;
28441  int __pyx_t_3;
28442 
28443  /* "View.MemoryView":827
28444  * cdef bint negative_step
28445  *
28446  * if not is_slice: # <<<<<<<<<<<<<<
28447  *
28448  * if start < 0:
28449  */
28450  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
28451  if (__pyx_t_1) {
28452 
28453  /* "View.MemoryView":829
28454  * if not is_slice:
28455  *
28456  * if start < 0: # <<<<<<<<<<<<<<
28457  * start += shape
28458  * if not 0 <= start < shape:
28459  */
28460  __pyx_t_1 = ((__pyx_v_start < 0) != 0);
28461  if (__pyx_t_1) {
28462 
28463  /* "View.MemoryView":830
28464  *
28465  * if start < 0:
28466  * start += shape # <<<<<<<<<<<<<<
28467  * if not 0 <= start < shape:
28468  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
28469  */
28470  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
28471 
28472  /* "View.MemoryView":829
28473  * if not is_slice:
28474  *
28475  * if start < 0: # <<<<<<<<<<<<<<
28476  * start += shape
28477  * if not 0 <= start < shape:
28478  */
28479  }
28480 
28481  /* "View.MemoryView":831
28482  * if start < 0:
28483  * start += shape
28484  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
28485  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
28486  * else:
28487  */
28488  __pyx_t_1 = (0 <= __pyx_v_start);
28489  if (__pyx_t_1) {
28490  __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
28491  }
28492  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
28493  if (__pyx_t_2) {
28494 
28495  /* "View.MemoryView":832
28496  * start += shape
28497  * if not 0 <= start < shape:
28498  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
28499  * else:
28500  *
28501  */
28502  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 832, __pyx_L1_error)
28503 
28504  /* "View.MemoryView":831
28505  * if start < 0:
28506  * start += shape
28507  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
28508  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
28509  * else:
28510  */
28511  }
28512 
28513  /* "View.MemoryView":827
28514  * cdef bint negative_step
28515  *
28516  * if not is_slice: # <<<<<<<<<<<<<<
28517  *
28518  * if start < 0:
28519  */
28520  goto __pyx_L3;
28521  }
28522 
28523  /* "View.MemoryView":835
28524  * else:
28525  *
28526  * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
28527  *
28528  * if have_step and step == 0:
28529  */
28530  /*else*/ {
28531  __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
28532  if (__pyx_t_1) {
28533  } else {
28534  __pyx_t_2 = __pyx_t_1;
28535  goto __pyx_L6_bool_binop_done;
28536  }
28537  __pyx_t_1 = ((__pyx_v_step < 0) != 0);
28538  __pyx_t_2 = __pyx_t_1;
28539  __pyx_L6_bool_binop_done:;
28540  __pyx_v_negative_step = __pyx_t_2;
28541 
28542  /* "View.MemoryView":837
28543  * negative_step = have_step != 0 and step < 0
28544  *
28545  * if have_step and step == 0: # <<<<<<<<<<<<<<
28546  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
28547  *
28548  */
28549  __pyx_t_1 = (__pyx_v_have_step != 0);
28550  if (__pyx_t_1) {
28551  } else {
28552  __pyx_t_2 = __pyx_t_1;
28553  goto __pyx_L9_bool_binop_done;
28554  }
28555  __pyx_t_1 = ((__pyx_v_step == 0) != 0);
28556  __pyx_t_2 = __pyx_t_1;
28557  __pyx_L9_bool_binop_done:;
28558  if (__pyx_t_2) {
28559 
28560  /* "View.MemoryView":838
28561  *
28562  * if have_step and step == 0:
28563  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
28564  *
28565  *
28566  */
28567  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 838, __pyx_L1_error)
28568 
28569  /* "View.MemoryView":837
28570  * negative_step = have_step != 0 and step < 0
28571  *
28572  * if have_step and step == 0: # <<<<<<<<<<<<<<
28573  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
28574  *
28575  */
28576  }
28577 
28578  /* "View.MemoryView":841
28579  *
28580  *
28581  * if have_start: # <<<<<<<<<<<<<<
28582  * if start < 0:
28583  * start += shape
28584  */
28585  __pyx_t_2 = (__pyx_v_have_start != 0);
28586  if (__pyx_t_2) {
28587 
28588  /* "View.MemoryView":842
28589  *
28590  * if have_start:
28591  * if start < 0: # <<<<<<<<<<<<<<
28592  * start += shape
28593  * if start < 0:
28594  */
28595  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
28596  if (__pyx_t_2) {
28597 
28598  /* "View.MemoryView":843
28599  * if have_start:
28600  * if start < 0:
28601  * start += shape # <<<<<<<<<<<<<<
28602  * if start < 0:
28603  * start = 0
28604  */
28605  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
28606 
28607  /* "View.MemoryView":844
28608  * if start < 0:
28609  * start += shape
28610  * if start < 0: # <<<<<<<<<<<<<<
28611  * start = 0
28612  * elif start >= shape:
28613  */
28614  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
28615  if (__pyx_t_2) {
28616 
28617  /* "View.MemoryView":845
28618  * start += shape
28619  * if start < 0:
28620  * start = 0 # <<<<<<<<<<<<<<
28621  * elif start >= shape:
28622  * if negative_step:
28623  */
28624  __pyx_v_start = 0;
28625 
28626  /* "View.MemoryView":844
28627  * if start < 0:
28628  * start += shape
28629  * if start < 0: # <<<<<<<<<<<<<<
28630  * start = 0
28631  * elif start >= shape:
28632  */
28633  }
28634 
28635  /* "View.MemoryView":842
28636  *
28637  * if have_start:
28638  * if start < 0: # <<<<<<<<<<<<<<
28639  * start += shape
28640  * if start < 0:
28641  */
28642  goto __pyx_L12;
28643  }
28644 
28645  /* "View.MemoryView":846
28646  * if start < 0:
28647  * start = 0
28648  * elif start >= shape: # <<<<<<<<<<<<<<
28649  * if negative_step:
28650  * start = shape - 1
28651  */
28652  __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
28653  if (__pyx_t_2) {
28654 
28655  /* "View.MemoryView":847
28656  * start = 0
28657  * elif start >= shape:
28658  * if negative_step: # <<<<<<<<<<<<<<
28659  * start = shape - 1
28660  * else:
28661  */
28662  __pyx_t_2 = (__pyx_v_negative_step != 0);
28663  if (__pyx_t_2) {
28664 
28665  /* "View.MemoryView":848
28666  * elif start >= shape:
28667  * if negative_step:
28668  * start = shape - 1 # <<<<<<<<<<<<<<
28669  * else:
28670  * start = shape
28671  */
28672  __pyx_v_start = (__pyx_v_shape - 1);
28673 
28674  /* "View.MemoryView":847
28675  * start = 0
28676  * elif start >= shape:
28677  * if negative_step: # <<<<<<<<<<<<<<
28678  * start = shape - 1
28679  * else:
28680  */
28681  goto __pyx_L14;
28682  }
28683 
28684  /* "View.MemoryView":850
28685  * start = shape - 1
28686  * else:
28687  * start = shape # <<<<<<<<<<<<<<
28688  * else:
28689  * if negative_step:
28690  */
28691  /*else*/ {
28692  __pyx_v_start = __pyx_v_shape;
28693  }
28694  __pyx_L14:;
28695 
28696  /* "View.MemoryView":846
28697  * if start < 0:
28698  * start = 0
28699  * elif start >= shape: # <<<<<<<<<<<<<<
28700  * if negative_step:
28701  * start = shape - 1
28702  */
28703  }
28704  __pyx_L12:;
28705 
28706  /* "View.MemoryView":841
28707  *
28708  *
28709  * if have_start: # <<<<<<<<<<<<<<
28710  * if start < 0:
28711  * start += shape
28712  */
28713  goto __pyx_L11;
28714  }
28715 
28716  /* "View.MemoryView":852
28717  * start = shape
28718  * else:
28719  * if negative_step: # <<<<<<<<<<<<<<
28720  * start = shape - 1
28721  * else:
28722  */
28723  /*else*/ {
28724  __pyx_t_2 = (__pyx_v_negative_step != 0);
28725  if (__pyx_t_2) {
28726 
28727  /* "View.MemoryView":853
28728  * else:
28729  * if negative_step:
28730  * start = shape - 1 # <<<<<<<<<<<<<<
28731  * else:
28732  * start = 0
28733  */
28734  __pyx_v_start = (__pyx_v_shape - 1);
28735 
28736  /* "View.MemoryView":852
28737  * start = shape
28738  * else:
28739  * if negative_step: # <<<<<<<<<<<<<<
28740  * start = shape - 1
28741  * else:
28742  */
28743  goto __pyx_L15;
28744  }
28745 
28746  /* "View.MemoryView":855
28747  * start = shape - 1
28748  * else:
28749  * start = 0 # <<<<<<<<<<<<<<
28750  *
28751  * if have_stop:
28752  */
28753  /*else*/ {
28754  __pyx_v_start = 0;
28755  }
28756  __pyx_L15:;
28757  }
28758  __pyx_L11:;
28759 
28760  /* "View.MemoryView":857
28761  * start = 0
28762  *
28763  * if have_stop: # <<<<<<<<<<<<<<
28764  * if stop < 0:
28765  * stop += shape
28766  */
28767  __pyx_t_2 = (__pyx_v_have_stop != 0);
28768  if (__pyx_t_2) {
28769 
28770  /* "View.MemoryView":858
28771  *
28772  * if have_stop:
28773  * if stop < 0: # <<<<<<<<<<<<<<
28774  * stop += shape
28775  * if stop < 0:
28776  */
28777  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
28778  if (__pyx_t_2) {
28779 
28780  /* "View.MemoryView":859
28781  * if have_stop:
28782  * if stop < 0:
28783  * stop += shape # <<<<<<<<<<<<<<
28784  * if stop < 0:
28785  * stop = 0
28786  */
28787  __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
28788 
28789  /* "View.MemoryView":860
28790  * if stop < 0:
28791  * stop += shape
28792  * if stop < 0: # <<<<<<<<<<<<<<
28793  * stop = 0
28794  * elif stop > shape:
28795  */
28796  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
28797  if (__pyx_t_2) {
28798 
28799  /* "View.MemoryView":861
28800  * stop += shape
28801  * if stop < 0:
28802  * stop = 0 # <<<<<<<<<<<<<<
28803  * elif stop > shape:
28804  * stop = shape
28805  */
28806  __pyx_v_stop = 0;
28807 
28808  /* "View.MemoryView":860
28809  * if stop < 0:
28810  * stop += shape
28811  * if stop < 0: # <<<<<<<<<<<<<<
28812  * stop = 0
28813  * elif stop > shape:
28814  */
28815  }
28816 
28817  /* "View.MemoryView":858
28818  *
28819  * if have_stop:
28820  * if stop < 0: # <<<<<<<<<<<<<<
28821  * stop += shape
28822  * if stop < 0:
28823  */
28824  goto __pyx_L17;
28825  }
28826 
28827  /* "View.MemoryView":862
28828  * if stop < 0:
28829  * stop = 0
28830  * elif stop > shape: # <<<<<<<<<<<<<<
28831  * stop = shape
28832  * else:
28833  */
28834  __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
28835  if (__pyx_t_2) {
28836 
28837  /* "View.MemoryView":863
28838  * stop = 0
28839  * elif stop > shape:
28840  * stop = shape # <<<<<<<<<<<<<<
28841  * else:
28842  * if negative_step:
28843  */
28844  __pyx_v_stop = __pyx_v_shape;
28845 
28846  /* "View.MemoryView":862
28847  * if stop < 0:
28848  * stop = 0
28849  * elif stop > shape: # <<<<<<<<<<<<<<
28850  * stop = shape
28851  * else:
28852  */
28853  }
28854  __pyx_L17:;
28855 
28856  /* "View.MemoryView":857
28857  * start = 0
28858  *
28859  * if have_stop: # <<<<<<<<<<<<<<
28860  * if stop < 0:
28861  * stop += shape
28862  */
28863  goto __pyx_L16;
28864  }
28865 
28866  /* "View.MemoryView":865
28867  * stop = shape
28868  * else:
28869  * if negative_step: # <<<<<<<<<<<<<<
28870  * stop = -1
28871  * else:
28872  */
28873  /*else*/ {
28874  __pyx_t_2 = (__pyx_v_negative_step != 0);
28875  if (__pyx_t_2) {
28876 
28877  /* "View.MemoryView":866
28878  * else:
28879  * if negative_step:
28880  * stop = -1 # <<<<<<<<<<<<<<
28881  * else:
28882  * stop = shape
28883  */
28884  __pyx_v_stop = -1L;
28885 
28886  /* "View.MemoryView":865
28887  * stop = shape
28888  * else:
28889  * if negative_step: # <<<<<<<<<<<<<<
28890  * stop = -1
28891  * else:
28892  */
28893  goto __pyx_L19;
28894  }
28895 
28896  /* "View.MemoryView":868
28897  * stop = -1
28898  * else:
28899  * stop = shape # <<<<<<<<<<<<<<
28900  *
28901  * if not have_step:
28902  */
28903  /*else*/ {
28904  __pyx_v_stop = __pyx_v_shape;
28905  }
28906  __pyx_L19:;
28907  }
28908  __pyx_L16:;
28909 
28910  /* "View.MemoryView":870
28911  * stop = shape
28912  *
28913  * if not have_step: # <<<<<<<<<<<<<<
28914  * step = 1
28915  *
28916  */
28917  __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
28918  if (__pyx_t_2) {
28919 
28920  /* "View.MemoryView":871
28921  *
28922  * if not have_step:
28923  * step = 1 # <<<<<<<<<<<<<<
28924  *
28925  *
28926  */
28927  __pyx_v_step = 1;
28928 
28929  /* "View.MemoryView":870
28930  * stop = shape
28931  *
28932  * if not have_step: # <<<<<<<<<<<<<<
28933  * step = 1
28934  *
28935  */
28936  }
28937 
28938  /* "View.MemoryView":875
28939  *
28940  * with cython.cdivision(True):
28941  * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
28942  *
28943  * if (stop - start) - step * new_shape:
28944  */
28945  __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
28946 
28947  /* "View.MemoryView":877
28948  * new_shape = (stop - start) // step
28949  *
28950  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
28951  * new_shape += 1
28952  *
28953  */
28954  __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
28955  if (__pyx_t_2) {
28956 
28957  /* "View.MemoryView":878
28958  *
28959  * if (stop - start) - step * new_shape:
28960  * new_shape += 1 # <<<<<<<<<<<<<<
28961  *
28962  * if new_shape < 0:
28963  */
28964  __pyx_v_new_shape = (__pyx_v_new_shape + 1);
28965 
28966  /* "View.MemoryView":877
28967  * new_shape = (stop - start) // step
28968  *
28969  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
28970  * new_shape += 1
28971  *
28972  */
28973  }
28974 
28975  /* "View.MemoryView":880
28976  * new_shape += 1
28977  *
28978  * if new_shape < 0: # <<<<<<<<<<<<<<
28979  * new_shape = 0
28980  *
28981  */
28982  __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
28983  if (__pyx_t_2) {
28984 
28985  /* "View.MemoryView":881
28986  *
28987  * if new_shape < 0:
28988  * new_shape = 0 # <<<<<<<<<<<<<<
28989  *
28990  *
28991  */
28992  __pyx_v_new_shape = 0;
28993 
28994  /* "View.MemoryView":880
28995  * new_shape += 1
28996  *
28997  * if new_shape < 0: # <<<<<<<<<<<<<<
28998  * new_shape = 0
28999  *
29000  */
29001  }
29002 
29003  /* "View.MemoryView":884
29004  *
29005  *
29006  * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
29007  * dst.shape[new_ndim] = new_shape
29008  * dst.suboffsets[new_ndim] = suboffset
29009  */
29010  (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
29011 
29012  /* "View.MemoryView":885
29013  *
29014  * dst.strides[new_ndim] = stride * step
29015  * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
29016  * dst.suboffsets[new_ndim] = suboffset
29017  *
29018  */
29019  (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
29020 
29021  /* "View.MemoryView":886
29022  * dst.strides[new_ndim] = stride * step
29023  * dst.shape[new_ndim] = new_shape
29024  * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
29025  *
29026  *
29027  */
29028  (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
29029  }
29030  __pyx_L3:;
29031 
29032  /* "View.MemoryView":889
29033  *
29034  *
29035  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
29036  * dst.data += start * stride
29037  * else:
29038  */
29039  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
29040  if (__pyx_t_2) {
29041 
29042  /* "View.MemoryView":890
29043  *
29044  * if suboffset_dim[0] < 0:
29045  * dst.data += start * stride # <<<<<<<<<<<<<<
29046  * else:
29047  * dst.suboffsets[suboffset_dim[0]] += start * stride
29048  */
29049  __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
29050 
29051  /* "View.MemoryView":889
29052  *
29053  *
29054  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
29055  * dst.data += start * stride
29056  * else:
29057  */
29058  goto __pyx_L23;
29059  }
29060 
29061  /* "View.MemoryView":892
29062  * dst.data += start * stride
29063  * else:
29064  * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
29065  *
29066  * if suboffset >= 0:
29067  */
29068  /*else*/ {
29069  __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
29070  (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
29071  }
29072  __pyx_L23:;
29073 
29074  /* "View.MemoryView":894
29075  * dst.suboffsets[suboffset_dim[0]] += start * stride
29076  *
29077  * if suboffset >= 0: # <<<<<<<<<<<<<<
29078  * if not is_slice:
29079  * if new_ndim == 0:
29080  */
29081  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
29082  if (__pyx_t_2) {
29083 
29084  /* "View.MemoryView":895
29085  *
29086  * if suboffset >= 0:
29087  * if not is_slice: # <<<<<<<<<<<<<<
29088  * if new_ndim == 0:
29089  * dst.data = (<char **> dst.data)[0] + suboffset
29090  */
29091  __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
29092  if (__pyx_t_2) {
29093 
29094  /* "View.MemoryView":896
29095  * if suboffset >= 0:
29096  * if not is_slice:
29097  * if new_ndim == 0: # <<<<<<<<<<<<<<
29098  * dst.data = (<char **> dst.data)[0] + suboffset
29099  * else:
29100  */
29101  __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
29102  if (__pyx_t_2) {
29103 
29104  /* "View.MemoryView":897
29105  * if not is_slice:
29106  * if new_ndim == 0:
29107  * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
29108  * else:
29109  * _err_dim(IndexError, "All dimensions preceding dimension %d "
29110  */
29111  __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
29112 
29113  /* "View.MemoryView":896
29114  * if suboffset >= 0:
29115  * if not is_slice:
29116  * if new_ndim == 0: # <<<<<<<<<<<<<<
29117  * dst.data = (<char **> dst.data)[0] + suboffset
29118  * else:
29119  */
29120  goto __pyx_L26;
29121  }
29122 
29123  /* "View.MemoryView":899
29124  * dst.data = (<char **> dst.data)[0] + suboffset
29125  * else:
29126  * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
29127  * "must be indexed and not sliced", dim)
29128  * else:
29129  */
29130  /*else*/ {
29131 
29132  /* "View.MemoryView":900
29133  * else:
29134  * _err_dim(IndexError, "All dimensions preceding dimension %d "
29135  * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
29136  * else:
29137  * suboffset_dim[0] = new_ndim
29138  */
29139  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 899, __pyx_L1_error)
29140  }
29141  __pyx_L26:;
29142 
29143  /* "View.MemoryView":895
29144  *
29145  * if suboffset >= 0:
29146  * if not is_slice: # <<<<<<<<<<<<<<
29147  * if new_ndim == 0:
29148  * dst.data = (<char **> dst.data)[0] + suboffset
29149  */
29150  goto __pyx_L25;
29151  }
29152 
29153  /* "View.MemoryView":902
29154  * "must be indexed and not sliced", dim)
29155  * else:
29156  * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
29157  *
29158  * return 0
29159  */
29160  /*else*/ {
29161  (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
29162  }
29163  __pyx_L25:;
29164 
29165  /* "View.MemoryView":894
29166  * dst.suboffsets[suboffset_dim[0]] += start * stride
29167  *
29168  * if suboffset >= 0: # <<<<<<<<<<<<<<
29169  * if not is_slice:
29170  * if new_ndim == 0:
29171  */
29172  }
29173 
29174  /* "View.MemoryView":904
29175  * suboffset_dim[0] = new_ndim
29176  *
29177  * return 0 # <<<<<<<<<<<<<<
29178  *
29179  *
29180  */
29181  __pyx_r = 0;
29182  goto __pyx_L0;
29183 
29184  /* "View.MemoryView":807
29185  *
29186  * @cname('__pyx_memoryview_slice_memviewslice')
29187  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
29188  * __Pyx_memviewslice *dst,
29189  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
29190  */
29191 
29192  /* function exit code */
29193  __pyx_L1_error:;
29194  {
29195  #ifdef WITH_THREAD
29196  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29197  #endif
29198  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
29199  #ifdef WITH_THREAD
29200  __Pyx_PyGILState_Release(__pyx_gilstate_save);
29201  #endif
29202  }
29203  __pyx_r = -1;
29204  __pyx_L0:;
29205  return __pyx_r;
29206 }
29207 
29208 /* "View.MemoryView":910
29209  *
29210  * @cname('__pyx_pybuffer_index')
29211  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
29212  * Py_ssize_t dim) except NULL:
29213  * cdef Py_ssize_t shape, stride, suboffset = -1
29214  */
29215 
29216 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
29217  Py_ssize_t __pyx_v_shape;
29218  Py_ssize_t __pyx_v_stride;
29219  Py_ssize_t __pyx_v_suboffset;
29220  Py_ssize_t __pyx_v_itemsize;
29221  char *__pyx_v_resultp;
29222  char *__pyx_r;
29223  __Pyx_RefNannyDeclarations
29224  Py_ssize_t __pyx_t_1;
29225  int __pyx_t_2;
29226  PyObject *__pyx_t_3 = NULL;
29227  PyObject *__pyx_t_4 = NULL;
29228  __Pyx_RefNannySetupContext("pybuffer_index", 0);
29229 
29230  /* "View.MemoryView":912
29231  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
29232  * Py_ssize_t dim) except NULL:
29233  * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
29234  * cdef Py_ssize_t itemsize = view.itemsize
29235  * cdef char *resultp
29236  */
29237  __pyx_v_suboffset = -1L;
29238 
29239  /* "View.MemoryView":913
29240  * Py_ssize_t dim) except NULL:
29241  * cdef Py_ssize_t shape, stride, suboffset = -1
29242  * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
29243  * cdef char *resultp
29244  *
29245  */
29246  __pyx_t_1 = __pyx_v_view->itemsize;
29247  __pyx_v_itemsize = __pyx_t_1;
29248 
29249  /* "View.MemoryView":916
29250  * cdef char *resultp
29251  *
29252  * if view.ndim == 0: # <<<<<<<<<<<<<<
29253  * shape = view.len / itemsize
29254  * stride = itemsize
29255  */
29256  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
29257  if (__pyx_t_2) {
29258 
29259  /* "View.MemoryView":917
29260  *
29261  * if view.ndim == 0:
29262  * shape = view.len / itemsize # <<<<<<<<<<<<<<
29263  * stride = itemsize
29264  * else:
29265  */
29266  if (unlikely(__pyx_v_itemsize == 0)) {
29267  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
29268  __PYX_ERR(0, 917, __pyx_L1_error)
29269  }
29270  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
29271  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
29272  __PYX_ERR(0, 917, __pyx_L1_error)
29273  }
29274  __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
29275 
29276  /* "View.MemoryView":918
29277  * if view.ndim == 0:
29278  * shape = view.len / itemsize
29279  * stride = itemsize # <<<<<<<<<<<<<<
29280  * else:
29281  * shape = view.shape[dim]
29282  */
29283  __pyx_v_stride = __pyx_v_itemsize;
29284 
29285  /* "View.MemoryView":916
29286  * cdef char *resultp
29287  *
29288  * if view.ndim == 0: # <<<<<<<<<<<<<<
29289  * shape = view.len / itemsize
29290  * stride = itemsize
29291  */
29292  goto __pyx_L3;
29293  }
29294 
29295  /* "View.MemoryView":920
29296  * stride = itemsize
29297  * else:
29298  * shape = view.shape[dim] # <<<<<<<<<<<<<<
29299  * stride = view.strides[dim]
29300  * if view.suboffsets != NULL:
29301  */
29302  /*else*/ {
29303  __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
29304 
29305  /* "View.MemoryView":921
29306  * else:
29307  * shape = view.shape[dim]
29308  * stride = view.strides[dim] # <<<<<<<<<<<<<<
29309  * if view.suboffsets != NULL:
29310  * suboffset = view.suboffsets[dim]
29311  */
29312  __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
29313 
29314  /* "View.MemoryView":922
29315  * shape = view.shape[dim]
29316  * stride = view.strides[dim]
29317  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
29318  * suboffset = view.suboffsets[dim]
29319  *
29320  */
29321  __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
29322  if (__pyx_t_2) {
29323 
29324  /* "View.MemoryView":923
29325  * stride = view.strides[dim]
29326  * if view.suboffsets != NULL:
29327  * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
29328  *
29329  * if index < 0:
29330  */
29331  __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
29332 
29333  /* "View.MemoryView":922
29334  * shape = view.shape[dim]
29335  * stride = view.strides[dim]
29336  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
29337  * suboffset = view.suboffsets[dim]
29338  *
29339  */
29340  }
29341  }
29342  __pyx_L3:;
29343 
29344  /* "View.MemoryView":925
29345  * suboffset = view.suboffsets[dim]
29346  *
29347  * if index < 0: # <<<<<<<<<<<<<<
29348  * index += view.shape[dim]
29349  * if index < 0:
29350  */
29351  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
29352  if (__pyx_t_2) {
29353 
29354  /* "View.MemoryView":926
29355  *
29356  * if index < 0:
29357  * index += view.shape[dim] # <<<<<<<<<<<<<<
29358  * if index < 0:
29359  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29360  */
29361  __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
29362 
29363  /* "View.MemoryView":927
29364  * if index < 0:
29365  * index += view.shape[dim]
29366  * if index < 0: # <<<<<<<<<<<<<<
29367  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29368  *
29369  */
29370  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
29371  if (unlikely(__pyx_t_2)) {
29372 
29373  /* "View.MemoryView":928
29374  * index += view.shape[dim]
29375  * if index < 0:
29376  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
29377  *
29378  * if index >= shape:
29379  */
29380  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
29381  __Pyx_GOTREF(__pyx_t_3);
29382  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
29383  __Pyx_GOTREF(__pyx_t_4);
29384  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29385  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
29386  __Pyx_GOTREF(__pyx_t_3);
29387  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29388  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
29389  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29390  __PYX_ERR(0, 928, __pyx_L1_error)
29391 
29392  /* "View.MemoryView":927
29393  * if index < 0:
29394  * index += view.shape[dim]
29395  * if index < 0: # <<<<<<<<<<<<<<
29396  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29397  *
29398  */
29399  }
29400 
29401  /* "View.MemoryView":925
29402  * suboffset = view.suboffsets[dim]
29403  *
29404  * if index < 0: # <<<<<<<<<<<<<<
29405  * index += view.shape[dim]
29406  * if index < 0:
29407  */
29408  }
29409 
29410  /* "View.MemoryView":930
29411  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29412  *
29413  * if index >= shape: # <<<<<<<<<<<<<<
29414  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29415  *
29416  */
29417  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
29418  if (unlikely(__pyx_t_2)) {
29419 
29420  /* "View.MemoryView":931
29421  *
29422  * if index >= shape:
29423  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
29424  *
29425  * resultp = bufp + index * stride
29426  */
29427  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
29428  __Pyx_GOTREF(__pyx_t_3);
29429  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
29430  __Pyx_GOTREF(__pyx_t_4);
29431  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29432  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
29433  __Pyx_GOTREF(__pyx_t_3);
29434  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29435  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
29436  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29437  __PYX_ERR(0, 931, __pyx_L1_error)
29438 
29439  /* "View.MemoryView":930
29440  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29441  *
29442  * if index >= shape: # <<<<<<<<<<<<<<
29443  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29444  *
29445  */
29446  }
29447 
29448  /* "View.MemoryView":933
29449  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29450  *
29451  * resultp = bufp + index * stride # <<<<<<<<<<<<<<
29452  * if suboffset >= 0:
29453  * resultp = (<char **> resultp)[0] + suboffset
29454  */
29455  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
29456 
29457  /* "View.MemoryView":934
29458  *
29459  * resultp = bufp + index * stride
29460  * if suboffset >= 0: # <<<<<<<<<<<<<<
29461  * resultp = (<char **> resultp)[0] + suboffset
29462  *
29463  */
29464  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
29465  if (__pyx_t_2) {
29466 
29467  /* "View.MemoryView":935
29468  * resultp = bufp + index * stride
29469  * if suboffset >= 0:
29470  * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
29471  *
29472  * return resultp
29473  */
29474  __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
29475 
29476  /* "View.MemoryView":934
29477  *
29478  * resultp = bufp + index * stride
29479  * if suboffset >= 0: # <<<<<<<<<<<<<<
29480  * resultp = (<char **> resultp)[0] + suboffset
29481  *
29482  */
29483  }
29484 
29485  /* "View.MemoryView":937
29486  * resultp = (<char **> resultp)[0] + suboffset
29487  *
29488  * return resultp # <<<<<<<<<<<<<<
29489  *
29490  *
29491  */
29492  __pyx_r = __pyx_v_resultp;
29493  goto __pyx_L0;
29494 
29495  /* "View.MemoryView":910
29496  *
29497  * @cname('__pyx_pybuffer_index')
29498  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
29499  * Py_ssize_t dim) except NULL:
29500  * cdef Py_ssize_t shape, stride, suboffset = -1
29501  */
29502 
29503  /* function exit code */
29504  __pyx_L1_error:;
29505  __Pyx_XDECREF(__pyx_t_3);
29506  __Pyx_XDECREF(__pyx_t_4);
29507  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
29508  __pyx_r = NULL;
29509  __pyx_L0:;
29510  __Pyx_RefNannyFinishContext();
29511  return __pyx_r;
29512 }
29513 
29514 /* "View.MemoryView":943
29515  *
29516  * @cname('__pyx_memslice_transpose')
29517  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
29518  * cdef int ndim = memslice.memview.view.ndim
29519  *
29520  */
29521 
29522 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
29523  int __pyx_v_ndim;
29524  Py_ssize_t *__pyx_v_shape;
29525  Py_ssize_t *__pyx_v_strides;
29526  int __pyx_v_i;
29527  int __pyx_v_j;
29528  int __pyx_r;
29529  int __pyx_t_1;
29530  Py_ssize_t *__pyx_t_2;
29531  long __pyx_t_3;
29532  long __pyx_t_4;
29533  Py_ssize_t __pyx_t_5;
29534  Py_ssize_t __pyx_t_6;
29535  int __pyx_t_7;
29536  int __pyx_t_8;
29537  int __pyx_t_9;
29538 
29539  /* "View.MemoryView":944
29540  * @cname('__pyx_memslice_transpose')
29541  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
29542  * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
29543  *
29544  * cdef Py_ssize_t *shape = memslice.shape
29545  */
29546  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
29547  __pyx_v_ndim = __pyx_t_1;
29548 
29549  /* "View.MemoryView":946
29550  * cdef int ndim = memslice.memview.view.ndim
29551  *
29552  * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
29553  * cdef Py_ssize_t *strides = memslice.strides
29554  *
29555  */
29556  __pyx_t_2 = __pyx_v_memslice->shape;
29557  __pyx_v_shape = __pyx_t_2;
29558 
29559  /* "View.MemoryView":947
29560  *
29561  * cdef Py_ssize_t *shape = memslice.shape
29562  * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
29563  *
29564  *
29565  */
29566  __pyx_t_2 = __pyx_v_memslice->strides;
29567  __pyx_v_strides = __pyx_t_2;
29568 
29569  /* "View.MemoryView":951
29570  *
29571  * cdef int i, j
29572  * for i in range(ndim / 2): # <<<<<<<<<<<<<<
29573  * j = ndim - 1 - i
29574  * strides[i], strides[j] = strides[j], strides[i]
29575  */
29576  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
29577  __pyx_t_4 = __pyx_t_3;
29578  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
29579  __pyx_v_i = __pyx_t_1;
29580 
29581  /* "View.MemoryView":952
29582  * cdef int i, j
29583  * for i in range(ndim / 2):
29584  * j = ndim - 1 - i # <<<<<<<<<<<<<<
29585  * strides[i], strides[j] = strides[j], strides[i]
29586  * shape[i], shape[j] = shape[j], shape[i]
29587  */
29588  __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
29589 
29590  /* "View.MemoryView":953
29591  * for i in range(ndim / 2):
29592  * j = ndim - 1 - i
29593  * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
29594  * shape[i], shape[j] = shape[j], shape[i]
29595  *
29596  */
29597  __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
29598  __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
29599  (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
29600  (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
29601 
29602  /* "View.MemoryView":954
29603  * j = ndim - 1 - i
29604  * strides[i], strides[j] = strides[j], strides[i]
29605  * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
29606  *
29607  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
29608  */
29609  __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
29610  __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
29611  (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
29612  (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
29613 
29614  /* "View.MemoryView":956
29615  * shape[i], shape[j] = shape[j], shape[i]
29616  *
29617  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
29618  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29619  *
29620  */
29621  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
29622  if (!__pyx_t_8) {
29623  } else {
29624  __pyx_t_7 = __pyx_t_8;
29625  goto __pyx_L6_bool_binop_done;
29626  }
29627  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
29628  __pyx_t_7 = __pyx_t_8;
29629  __pyx_L6_bool_binop_done:;
29630  if (__pyx_t_7) {
29631 
29632  /* "View.MemoryView":957
29633  *
29634  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
29635  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
29636  *
29637  * return 1
29638  */
29639  __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 957, __pyx_L1_error)
29640 
29641  /* "View.MemoryView":956
29642  * shape[i], shape[j] = shape[j], shape[i]
29643  *
29644  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
29645  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29646  *
29647  */
29648  }
29649  }
29650 
29651  /* "View.MemoryView":959
29652  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29653  *
29654  * return 1 # <<<<<<<<<<<<<<
29655  *
29656  *
29657  */
29658  __pyx_r = 1;
29659  goto __pyx_L0;
29660 
29661  /* "View.MemoryView":943
29662  *
29663  * @cname('__pyx_memslice_transpose')
29664  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
29665  * cdef int ndim = memslice.memview.view.ndim
29666  *
29667  */
29668 
29669  /* function exit code */
29670  __pyx_L1_error:;
29671  {
29672  #ifdef WITH_THREAD
29673  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29674  #endif
29675  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
29676  #ifdef WITH_THREAD
29677  __Pyx_PyGILState_Release(__pyx_gilstate_save);
29678  #endif
29679  }
29680  __pyx_r = 0;
29681  __pyx_L0:;
29682  return __pyx_r;
29683 }
29684 
29685 /* "View.MemoryView":976
29686  * cdef int (*to_dtype_func)(char *, object) except 0
29687  *
29688  * def __dealloc__(self): # <<<<<<<<<<<<<<
29689  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29690  *
29691  */
29692 
29693 /* Python wrapper */
29694 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
29695 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
29696  __Pyx_RefNannyDeclarations
29697  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
29698  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29699 
29700  /* function exit code */
29701  __Pyx_RefNannyFinishContext();
29702 }
29703 
29704 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29705  __Pyx_RefNannyDeclarations
29706  __Pyx_RefNannySetupContext("__dealloc__", 0);
29707 
29708  /* "View.MemoryView":977
29709  *
29710  * def __dealloc__(self):
29711  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
29712  *
29713  * cdef convert_item_to_object(self, char *itemp):
29714  */
29715  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
29716 
29717  /* "View.MemoryView":976
29718  * cdef int (*to_dtype_func)(char *, object) except 0
29719  *
29720  * def __dealloc__(self): # <<<<<<<<<<<<<<
29721  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29722  *
29723  */
29724 
29725  /* function exit code */
29726  __Pyx_RefNannyFinishContext();
29727 }
29728 
29729 /* "View.MemoryView":979
29730  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29731  *
29732  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
29733  * if self.to_object_func != NULL:
29734  * return self.to_object_func(itemp)
29735  */
29736 
29737 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
29738  PyObject *__pyx_r = NULL;
29739  __Pyx_RefNannyDeclarations
29740  int __pyx_t_1;
29741  PyObject *__pyx_t_2 = NULL;
29742  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
29743 
29744  /* "View.MemoryView":980
29745  *
29746  * cdef convert_item_to_object(self, char *itemp):
29747  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
29748  * return self.to_object_func(itemp)
29749  * else:
29750  */
29751  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
29752  if (__pyx_t_1) {
29753 
29754  /* "View.MemoryView":981
29755  * cdef convert_item_to_object(self, char *itemp):
29756  * if self.to_object_func != NULL:
29757  * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
29758  * else:
29759  * return memoryview.convert_item_to_object(self, itemp)
29760  */
29761  __Pyx_XDECREF(__pyx_r);
29762  __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
29763  __Pyx_GOTREF(__pyx_t_2);
29764  __pyx_r = __pyx_t_2;
29765  __pyx_t_2 = 0;
29766  goto __pyx_L0;
29767 
29768  /* "View.MemoryView":980
29769  *
29770  * cdef convert_item_to_object(self, char *itemp):
29771  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
29772  * return self.to_object_func(itemp)
29773  * else:
29774  */
29775  }
29776 
29777  /* "View.MemoryView":983
29778  * return self.to_object_func(itemp)
29779  * else:
29780  * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
29781  *
29782  * cdef assign_item_from_object(self, char *itemp, object value):
29783  */
29784  /*else*/ {
29785  __Pyx_XDECREF(__pyx_r);
29786  __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
29787  __Pyx_GOTREF(__pyx_t_2);
29788  __pyx_r = __pyx_t_2;
29789  __pyx_t_2 = 0;
29790  goto __pyx_L0;
29791  }
29792 
29793  /* "View.MemoryView":979
29794  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29795  *
29796  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
29797  * if self.to_object_func != NULL:
29798  * return self.to_object_func(itemp)
29799  */
29800 
29801  /* function exit code */
29802  __pyx_L1_error:;
29803  __Pyx_XDECREF(__pyx_t_2);
29804  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
29805  __pyx_r = 0;
29806  __pyx_L0:;
29807  __Pyx_XGIVEREF(__pyx_r);
29808  __Pyx_RefNannyFinishContext();
29809  return __pyx_r;
29810 }
29811 
29812 /* "View.MemoryView":985
29813  * return memoryview.convert_item_to_object(self, itemp)
29814  *
29815  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
29816  * if self.to_dtype_func != NULL:
29817  * self.to_dtype_func(itemp, value)
29818  */
29819 
29820 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
29821  PyObject *__pyx_r = NULL;
29822  __Pyx_RefNannyDeclarations
29823  int __pyx_t_1;
29824  int __pyx_t_2;
29825  PyObject *__pyx_t_3 = NULL;
29826  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
29827 
29828  /* "View.MemoryView":986
29829  *
29830  * cdef assign_item_from_object(self, char *itemp, object value):
29831  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
29832  * self.to_dtype_func(itemp, value)
29833  * else:
29834  */
29835  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
29836  if (__pyx_t_1) {
29837 
29838  /* "View.MemoryView":987
29839  * cdef assign_item_from_object(self, char *itemp, object value):
29840  * if self.to_dtype_func != NULL:
29841  * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
29842  * else:
29843  * memoryview.assign_item_from_object(self, itemp, value)
29844  */
29845  __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 987, __pyx_L1_error)
29846 
29847  /* "View.MemoryView":986
29848  *
29849  * cdef assign_item_from_object(self, char *itemp, object value):
29850  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
29851  * self.to_dtype_func(itemp, value)
29852  * else:
29853  */
29854  goto __pyx_L3;
29855  }
29856 
29857  /* "View.MemoryView":989
29858  * self.to_dtype_func(itemp, value)
29859  * else:
29860  * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
29861  *
29862  * @property
29863  */
29864  /*else*/ {
29865  __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L1_error)
29866  __Pyx_GOTREF(__pyx_t_3);
29867  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29868  }
29869  __pyx_L3:;
29870 
29871  /* "View.MemoryView":985
29872  * return memoryview.convert_item_to_object(self, itemp)
29873  *
29874  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
29875  * if self.to_dtype_func != NULL:
29876  * self.to_dtype_func(itemp, value)
29877  */
29878 
29879  /* function exit code */
29880  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29881  goto __pyx_L0;
29882  __pyx_L1_error:;
29883  __Pyx_XDECREF(__pyx_t_3);
29884  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
29885  __pyx_r = 0;
29886  __pyx_L0:;
29887  __Pyx_XGIVEREF(__pyx_r);
29888  __Pyx_RefNannyFinishContext();
29889  return __pyx_r;
29890 }
29891 
29892 /* "View.MemoryView":992
29893  *
29894  * @property
29895  * def base(self): # <<<<<<<<<<<<<<
29896  * return self.from_object
29897  *
29898  */
29899 
29900 /* Python wrapper */
29901 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
29902 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
29903  PyObject *__pyx_r = 0;
29904  __Pyx_RefNannyDeclarations
29905  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29906  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29907 
29908  /* function exit code */
29909  __Pyx_RefNannyFinishContext();
29910  return __pyx_r;
29911 }
29912 
29913 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29914  PyObject *__pyx_r = NULL;
29915  __Pyx_RefNannyDeclarations
29916  __Pyx_RefNannySetupContext("__get__", 0);
29917 
29918  /* "View.MemoryView":993
29919  * @property
29920  * def base(self):
29921  * return self.from_object # <<<<<<<<<<<<<<
29922  *
29923  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
29924  */
29925  __Pyx_XDECREF(__pyx_r);
29926  __Pyx_INCREF(__pyx_v_self->from_object);
29927  __pyx_r = __pyx_v_self->from_object;
29928  goto __pyx_L0;
29929 
29930  /* "View.MemoryView":992
29931  *
29932  * @property
29933  * def base(self): # <<<<<<<<<<<<<<
29934  * return self.from_object
29935  *
29936  */
29937 
29938  /* function exit code */
29939  __pyx_L0:;
29940  __Pyx_XGIVEREF(__pyx_r);
29941  __Pyx_RefNannyFinishContext();
29942  return __pyx_r;
29943 }
29944 
29945 /* "(tree fragment)":1
29946  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
29947  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29948  * def __setstate_cython__(self, __pyx_state):
29949  */
29950 
29951 /* Python wrapper */
29952 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
29953 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
29954  PyObject *__pyx_r = 0;
29955  __Pyx_RefNannyDeclarations
29956  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
29957  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29958 
29959  /* function exit code */
29960  __Pyx_RefNannyFinishContext();
29961  return __pyx_r;
29962 }
29963 
29964 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29965  PyObject *__pyx_r = NULL;
29966  __Pyx_RefNannyDeclarations
29967  PyObject *__pyx_t_1 = NULL;
29968  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
29969 
29970  /* "(tree fragment)":2
29971  * def __reduce_cython__(self):
29972  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
29973  * def __setstate_cython__(self, __pyx_state):
29974  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29975  */
29976  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
29977  __Pyx_GOTREF(__pyx_t_1);
29978  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
29979  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29980  __PYX_ERR(0, 2, __pyx_L1_error)
29981 
29982  /* "(tree fragment)":1
29983  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
29984  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29985  * def __setstate_cython__(self, __pyx_state):
29986  */
29987 
29988  /* function exit code */
29989  __pyx_L1_error:;
29990  __Pyx_XDECREF(__pyx_t_1);
29991  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29992  __pyx_r = NULL;
29993  __Pyx_XGIVEREF(__pyx_r);
29994  __Pyx_RefNannyFinishContext();
29995  return __pyx_r;
29996 }
29997 
29998 /* "(tree fragment)":3
29999  * def __reduce_cython__(self):
30000  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
30001  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
30002  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
30003  */
30004 
30005 /* Python wrapper */
30006 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
30007 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
30008  PyObject *__pyx_r = 0;
30009  __Pyx_RefNannyDeclarations
30010  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
30011  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
30012 
30013  /* function exit code */
30014  __Pyx_RefNannyFinishContext();
30015  return __pyx_r;
30016 }
30017 
30018 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
30019  PyObject *__pyx_r = NULL;
30020  __Pyx_RefNannyDeclarations
30021  PyObject *__pyx_t_1 = NULL;
30022  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
30023 
30024  /* "(tree fragment)":4
30025  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
30026  * def __setstate_cython__(self, __pyx_state):
30027  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
30028  */
30029  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
30030  __Pyx_GOTREF(__pyx_t_1);
30031  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
30032  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30033  __PYX_ERR(0, 4, __pyx_L1_error)
30034 
30035  /* "(tree fragment)":3
30036  * def __reduce_cython__(self):
30037  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
30038  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
30039  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
30040  */
30041 
30042  /* function exit code */
30043  __pyx_L1_error:;
30044  __Pyx_XDECREF(__pyx_t_1);
30045  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30046  __pyx_r = NULL;
30047  __Pyx_XGIVEREF(__pyx_r);
30048  __Pyx_RefNannyFinishContext();
30049  return __pyx_r;
30050 }
30051 
30052 /* "View.MemoryView":999
30053  *
30054  * @cname('__pyx_memoryview_fromslice')
30055  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
30056  * int ndim,
30057  * object (*to_object_func)(char *),
30058  */
30059 
30060 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
30061  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
30062  Py_ssize_t __pyx_v_suboffset;
30063  PyObject *__pyx_v_length = NULL;
30064  PyObject *__pyx_r = NULL;
30065  __Pyx_RefNannyDeclarations
30066  int __pyx_t_1;
30067  PyObject *__pyx_t_2 = NULL;
30068  PyObject *__pyx_t_3 = NULL;
30069  __Pyx_TypeInfo *__pyx_t_4;
30070  Py_buffer __pyx_t_5;
30071  Py_ssize_t *__pyx_t_6;
30072  Py_ssize_t *__pyx_t_7;
30073  Py_ssize_t *__pyx_t_8;
30074  Py_ssize_t __pyx_t_9;
30075  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
30076 
30077  /* "View.MemoryView":1007
30078  * cdef _memoryviewslice result
30079  *
30080  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
30081  * return None
30082  *
30083  */
30084  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
30085  if (__pyx_t_1) {
30086 
30087  /* "View.MemoryView":1008
30088  *
30089  * if <PyObject *> memviewslice.memview == Py_None:
30090  * return None # <<<<<<<<<<<<<<
30091  *
30092  *
30093  */
30094  __Pyx_XDECREF(__pyx_r);
30095  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30096  goto __pyx_L0;
30097 
30098  /* "View.MemoryView":1007
30099  * cdef _memoryviewslice result
30100  *
30101  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
30102  * return None
30103  *
30104  */
30105  }
30106 
30107  /* "View.MemoryView":1013
30108  *
30109  *
30110  * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
30111  *
30112  * result.from_slice = memviewslice
30113  */
30114  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
30115  __Pyx_GOTREF(__pyx_t_2);
30116  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
30117  __Pyx_GOTREF(__pyx_t_3);
30118  __Pyx_INCREF(Py_None);
30119  __Pyx_GIVEREF(Py_None);
30120  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
30121  __Pyx_INCREF(__pyx_int_0);
30122  __Pyx_GIVEREF(__pyx_int_0);
30123  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
30124  __Pyx_GIVEREF(__pyx_t_2);
30125  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
30126  __pyx_t_2 = 0;
30127  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
30128  __Pyx_GOTREF(__pyx_t_2);
30129  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30130  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
30131  __pyx_t_2 = 0;
30132 
30133  /* "View.MemoryView":1015
30134  * result = _memoryviewslice(None, 0, dtype_is_object)
30135  *
30136  * result.from_slice = memviewslice # <<<<<<<<<<<<<<
30137  * __PYX_INC_MEMVIEW(&memviewslice, 1)
30138  *
30139  */
30140  __pyx_v_result->from_slice = __pyx_v_memviewslice;
30141 
30142  /* "View.MemoryView":1016
30143  *
30144  * result.from_slice = memviewslice
30145  * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
30146  *
30147  * result.from_object = (<memoryview> memviewslice.memview).base
30148  */
30149  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
30150 
30151  /* "View.MemoryView":1018
30152  * __PYX_INC_MEMVIEW(&memviewslice, 1)
30153  *
30154  * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
30155  * result.typeinfo = memviewslice.memview.typeinfo
30156  *
30157  */
30158  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
30159  __Pyx_GOTREF(__pyx_t_2);
30160  __Pyx_GIVEREF(__pyx_t_2);
30161  __Pyx_GOTREF(__pyx_v_result->from_object);
30162  __Pyx_DECREF(__pyx_v_result->from_object);
30163  __pyx_v_result->from_object = __pyx_t_2;
30164  __pyx_t_2 = 0;
30165 
30166  /* "View.MemoryView":1019
30167  *
30168  * result.from_object = (<memoryview> memviewslice.memview).base
30169  * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
30170  *
30171  * result.view = memviewslice.memview.view
30172  */
30173  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
30174  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
30175 
30176  /* "View.MemoryView":1021
30177  * result.typeinfo = memviewslice.memview.typeinfo
30178  *
30179  * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
30180  * result.view.buf = <void *> memviewslice.data
30181  * result.view.ndim = ndim
30182  */
30183  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
30184  __pyx_v_result->__pyx_base.view = __pyx_t_5;
30185 
30186  /* "View.MemoryView":1022
30187  *
30188  * result.view = memviewslice.memview.view
30189  * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
30190  * result.view.ndim = ndim
30191  * (<__pyx_buffer *> &result.view).obj = Py_None
30192  */
30193  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
30194 
30195  /* "View.MemoryView":1023
30196  * result.view = memviewslice.memview.view
30197  * result.view.buf = <void *> memviewslice.data
30198  * result.view.ndim = ndim # <<<<<<<<<<<<<<
30199  * (<__pyx_buffer *> &result.view).obj = Py_None
30200  * Py_INCREF(Py_None)
30201  */
30202  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
30203 
30204  /* "View.MemoryView":1024
30205  * result.view.buf = <void *> memviewslice.data
30206  * result.view.ndim = ndim
30207  * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
30208  * Py_INCREF(Py_None)
30209  *
30210  */
30211  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
30212 
30213  /* "View.MemoryView":1025
30214  * result.view.ndim = ndim
30215  * (<__pyx_buffer *> &result.view).obj = Py_None
30216  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
30217  *
30218  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
30219  */
30220  Py_INCREF(Py_None);
30221 
30222  /* "View.MemoryView":1027
30223  * Py_INCREF(Py_None)
30224  *
30225  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
30226  * result.flags = PyBUF_RECORDS
30227  * else:
30228  */
30229  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
30230  if (__pyx_t_1) {
30231 
30232  /* "View.MemoryView":1028
30233  *
30234  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
30235  * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
30236  * else:
30237  * result.flags = PyBUF_RECORDS_RO
30238  */
30239  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
30240 
30241  /* "View.MemoryView":1027
30242  * Py_INCREF(Py_None)
30243  *
30244  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
30245  * result.flags = PyBUF_RECORDS
30246  * else:
30247  */
30248  goto __pyx_L4;
30249  }
30250 
30251  /* "View.MemoryView":1030
30252  * result.flags = PyBUF_RECORDS
30253  * else:
30254  * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
30255  *
30256  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
30257  */
30258  /*else*/ {
30259  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
30260  }
30261  __pyx_L4:;
30262 
30263  /* "View.MemoryView":1032
30264  * result.flags = PyBUF_RECORDS_RO
30265  *
30266  * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
30267  * result.view.strides = <Py_ssize_t *> result.from_slice.strides
30268  *
30269  */
30270  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
30271 
30272  /* "View.MemoryView":1033
30273  *
30274  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
30275  * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
30276  *
30277  *
30278  */
30279  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
30280 
30281  /* "View.MemoryView":1036
30282  *
30283  *
30284  * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
30285  * for suboffset in result.from_slice.suboffsets[:ndim]:
30286  * if suboffset >= 0:
30287  */
30288  __pyx_v_result->__pyx_base.view.suboffsets = NULL;
30289 
30290  /* "View.MemoryView":1037
30291  *
30292  * result.view.suboffsets = NULL
30293  * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
30294  * if suboffset >= 0:
30295  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30296  */
30297  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
30298  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
30299  __pyx_t_6 = __pyx_t_8;
30300  __pyx_v_suboffset = (__pyx_t_6[0]);
30301 
30302  /* "View.MemoryView":1038
30303  * result.view.suboffsets = NULL
30304  * for suboffset in result.from_slice.suboffsets[:ndim]:
30305  * if suboffset >= 0: # <<<<<<<<<<<<<<
30306  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30307  * break
30308  */
30309  __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
30310  if (__pyx_t_1) {
30311 
30312  /* "View.MemoryView":1039
30313  * for suboffset in result.from_slice.suboffsets[:ndim]:
30314  * if suboffset >= 0:
30315  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
30316  * break
30317  *
30318  */
30319  __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
30320 
30321  /* "View.MemoryView":1040
30322  * if suboffset >= 0:
30323  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30324  * break # <<<<<<<<<<<<<<
30325  *
30326  * result.view.len = result.view.itemsize
30327  */
30328  goto __pyx_L6_break;
30329 
30330  /* "View.MemoryView":1038
30331  * result.view.suboffsets = NULL
30332  * for suboffset in result.from_slice.suboffsets[:ndim]:
30333  * if suboffset >= 0: # <<<<<<<<<<<<<<
30334  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30335  * break
30336  */
30337  }
30338  }
30339  __pyx_L6_break:;
30340 
30341  /* "View.MemoryView":1042
30342  * break
30343  *
30344  * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
30345  * for length in result.view.shape[:ndim]:
30346  * result.view.len *= length
30347  */
30348  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
30349  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
30350 
30351  /* "View.MemoryView":1043
30352  *
30353  * result.view.len = result.view.itemsize
30354  * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
30355  * result.view.len *= length
30356  *
30357  */
30358  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
30359  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
30360  __pyx_t_6 = __pyx_t_8;
30361  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
30362  __Pyx_GOTREF(__pyx_t_2);
30363  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
30364  __pyx_t_2 = 0;
30365 
30366  /* "View.MemoryView":1044
30367  * result.view.len = result.view.itemsize
30368  * for length in result.view.shape[:ndim]:
30369  * result.view.len *= length # <<<<<<<<<<<<<<
30370  *
30371  * result.to_object_func = to_object_func
30372  */
30373  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error)
30374  __Pyx_GOTREF(__pyx_t_2);
30375  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error)
30376  __Pyx_GOTREF(__pyx_t_3);
30377  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30378  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1044, __pyx_L1_error)
30379  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30380  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
30381  }
30382 
30383  /* "View.MemoryView":1046
30384  * result.view.len *= length
30385  *
30386  * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
30387  * result.to_dtype_func = to_dtype_func
30388  *
30389  */
30390  __pyx_v_result->to_object_func = __pyx_v_to_object_func;
30391 
30392  /* "View.MemoryView":1047
30393  *
30394  * result.to_object_func = to_object_func
30395  * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
30396  *
30397  * return result
30398  */
30399  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
30400 
30401  /* "View.MemoryView":1049
30402  * result.to_dtype_func = to_dtype_func
30403  *
30404  * return result # <<<<<<<<<<<<<<
30405  *
30406  * @cname('__pyx_memoryview_get_slice_from_memoryview')
30407  */
30408  __Pyx_XDECREF(__pyx_r);
30409  __Pyx_INCREF(((PyObject *)__pyx_v_result));
30410  __pyx_r = ((PyObject *)__pyx_v_result);
30411  goto __pyx_L0;
30412 
30413  /* "View.MemoryView":999
30414  *
30415  * @cname('__pyx_memoryview_fromslice')
30416  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
30417  * int ndim,
30418  * object (*to_object_func)(char *),
30419  */
30420 
30421  /* function exit code */
30422  __pyx_L1_error:;
30423  __Pyx_XDECREF(__pyx_t_2);
30424  __Pyx_XDECREF(__pyx_t_3);
30425  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
30426  __pyx_r = 0;
30427  __pyx_L0:;
30428  __Pyx_XDECREF((PyObject *)__pyx_v_result);
30429  __Pyx_XDECREF(__pyx_v_length);
30430  __Pyx_XGIVEREF(__pyx_r);
30431  __Pyx_RefNannyFinishContext();
30432  return __pyx_r;
30433 }
30434 
30435 /* "View.MemoryView":1052
30436  *
30437  * @cname('__pyx_memoryview_get_slice_from_memoryview')
30438  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
30439  * __Pyx_memviewslice *mslice) except NULL:
30440  * cdef _memoryviewslice obj
30441  */
30442 
30443 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
30444  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
30445  __Pyx_memviewslice *__pyx_r;
30446  __Pyx_RefNannyDeclarations
30447  int __pyx_t_1;
30448  int __pyx_t_2;
30449  PyObject *__pyx_t_3 = NULL;
30450  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
30451 
30452  /* "View.MemoryView":1055
30453  * __Pyx_memviewslice *mslice) except NULL:
30454  * cdef _memoryviewslice obj
30455  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30456  * obj = memview
30457  * return &obj.from_slice
30458  */
30459  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
30460  __pyx_t_2 = (__pyx_t_1 != 0);
30461  if (__pyx_t_2) {
30462 
30463  /* "View.MemoryView":1056
30464  * cdef _memoryviewslice obj
30465  * if isinstance(memview, _memoryviewslice):
30466  * obj = memview # <<<<<<<<<<<<<<
30467  * return &obj.from_slice
30468  * else:
30469  */
30470  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 1056, __pyx_L1_error)
30471  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
30472  __Pyx_INCREF(__pyx_t_3);
30473  __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
30474  __pyx_t_3 = 0;
30475 
30476  /* "View.MemoryView":1057
30477  * if isinstance(memview, _memoryviewslice):
30478  * obj = memview
30479  * return &obj.from_slice # <<<<<<<<<<<<<<
30480  * else:
30481  * slice_copy(memview, mslice)
30482  */
30483  __pyx_r = (&__pyx_v_obj->from_slice);
30484  goto __pyx_L0;
30485 
30486  /* "View.MemoryView":1055
30487  * __Pyx_memviewslice *mslice) except NULL:
30488  * cdef _memoryviewslice obj
30489  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30490  * obj = memview
30491  * return &obj.from_slice
30492  */
30493  }
30494 
30495  /* "View.MemoryView":1059
30496  * return &obj.from_slice
30497  * else:
30498  * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
30499  * return mslice
30500  *
30501  */
30502  /*else*/ {
30503  __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
30504 
30505  /* "View.MemoryView":1060
30506  * else:
30507  * slice_copy(memview, mslice)
30508  * return mslice # <<<<<<<<<<<<<<
30509  *
30510  * @cname('__pyx_memoryview_slice_copy')
30511  */
30512  __pyx_r = __pyx_v_mslice;
30513  goto __pyx_L0;
30514  }
30515 
30516  /* "View.MemoryView":1052
30517  *
30518  * @cname('__pyx_memoryview_get_slice_from_memoryview')
30519  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
30520  * __Pyx_memviewslice *mslice) except NULL:
30521  * cdef _memoryviewslice obj
30522  */
30523 
30524  /* function exit code */
30525  __pyx_L1_error:;
30526  __Pyx_XDECREF(__pyx_t_3);
30527  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
30528  __pyx_r = NULL;
30529  __pyx_L0:;
30530  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
30531  __Pyx_RefNannyFinishContext();
30532  return __pyx_r;
30533 }
30534 
30535 /* "View.MemoryView":1063
30536  *
30537  * @cname('__pyx_memoryview_slice_copy')
30538  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
30539  * cdef int dim
30540  * cdef (Py_ssize_t*) shape, strides, suboffsets
30541  */
30542 
30543 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
30544  int __pyx_v_dim;
30545  Py_ssize_t *__pyx_v_shape;
30546  Py_ssize_t *__pyx_v_strides;
30547  Py_ssize_t *__pyx_v_suboffsets;
30548  __Pyx_RefNannyDeclarations
30549  Py_ssize_t *__pyx_t_1;
30550  int __pyx_t_2;
30551  int __pyx_t_3;
30552  int __pyx_t_4;
30553  Py_ssize_t __pyx_t_5;
30554  __Pyx_RefNannySetupContext("slice_copy", 0);
30555 
30556  /* "View.MemoryView":1067
30557  * cdef (Py_ssize_t*) shape, strides, suboffsets
30558  *
30559  * shape = memview.view.shape # <<<<<<<<<<<<<<
30560  * strides = memview.view.strides
30561  * suboffsets = memview.view.suboffsets
30562  */
30563  __pyx_t_1 = __pyx_v_memview->view.shape;
30564  __pyx_v_shape = __pyx_t_1;
30565 
30566  /* "View.MemoryView":1068
30567  *
30568  * shape = memview.view.shape
30569  * strides = memview.view.strides # <<<<<<<<<<<<<<
30570  * suboffsets = memview.view.suboffsets
30571  *
30572  */
30573  __pyx_t_1 = __pyx_v_memview->view.strides;
30574  __pyx_v_strides = __pyx_t_1;
30575 
30576  /* "View.MemoryView":1069
30577  * shape = memview.view.shape
30578  * strides = memview.view.strides
30579  * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
30580  *
30581  * dst.memview = <__pyx_memoryview *> memview
30582  */
30583  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
30584  __pyx_v_suboffsets = __pyx_t_1;
30585 
30586  /* "View.MemoryView":1071
30587  * suboffsets = memview.view.suboffsets
30588  *
30589  * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
30590  * dst.data = <char *> memview.view.buf
30591  *
30592  */
30593  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
30594 
30595  /* "View.MemoryView":1072
30596  *
30597  * dst.memview = <__pyx_memoryview *> memview
30598  * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
30599  *
30600  * for dim in range(memview.view.ndim):
30601  */
30602  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
30603 
30604  /* "View.MemoryView":1074
30605  * dst.data = <char *> memview.view.buf
30606  *
30607  * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
30608  * dst.shape[dim] = shape[dim]
30609  * dst.strides[dim] = strides[dim]
30610  */
30611  __pyx_t_2 = __pyx_v_memview->view.ndim;
30612  __pyx_t_3 = __pyx_t_2;
30613  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
30614  __pyx_v_dim = __pyx_t_4;
30615 
30616  /* "View.MemoryView":1075
30617  *
30618  * for dim in range(memview.view.ndim):
30619  * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
30620  * dst.strides[dim] = strides[dim]
30621  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
30622  */
30623  (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
30624 
30625  /* "View.MemoryView":1076
30626  * for dim in range(memview.view.ndim):
30627  * dst.shape[dim] = shape[dim]
30628  * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
30629  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
30630  *
30631  */
30632  (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
30633 
30634  /* "View.MemoryView":1077
30635  * dst.shape[dim] = shape[dim]
30636  * dst.strides[dim] = strides[dim]
30637  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
30638  *
30639  * @cname('__pyx_memoryview_copy_object')
30640  */
30641  if ((__pyx_v_suboffsets != 0)) {
30642  __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
30643  } else {
30644  __pyx_t_5 = -1L;
30645  }
30646  (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
30647  }
30648 
30649  /* "View.MemoryView":1063
30650  *
30651  * @cname('__pyx_memoryview_slice_copy')
30652  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
30653  * cdef int dim
30654  * cdef (Py_ssize_t*) shape, strides, suboffsets
30655  */
30656 
30657  /* function exit code */
30658  __Pyx_RefNannyFinishContext();
30659 }
30660 
30661 /* "View.MemoryView":1080
30662  *
30663  * @cname('__pyx_memoryview_copy_object')
30664  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
30665  * "Create a new memoryview object"
30666  * cdef __Pyx_memviewslice memviewslice
30667  */
30668 
30669 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
30670  __Pyx_memviewslice __pyx_v_memviewslice;
30671  PyObject *__pyx_r = NULL;
30672  __Pyx_RefNannyDeclarations
30673  PyObject *__pyx_t_1 = NULL;
30674  __Pyx_RefNannySetupContext("memoryview_copy", 0);
30675 
30676  /* "View.MemoryView":1083
30677  * "Create a new memoryview object"
30678  * cdef __Pyx_memviewslice memviewslice
30679  * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
30680  * return memoryview_copy_from_slice(memview, &memviewslice)
30681  *
30682  */
30683  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
30684 
30685  /* "View.MemoryView":1084
30686  * cdef __Pyx_memviewslice memviewslice
30687  * slice_copy(memview, &memviewslice)
30688  * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
30689  *
30690  * @cname('__pyx_memoryview_copy_object_from_slice')
30691  */
30692  __Pyx_XDECREF(__pyx_r);
30693  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
30694  __Pyx_GOTREF(__pyx_t_1);
30695  __pyx_r = __pyx_t_1;
30696  __pyx_t_1 = 0;
30697  goto __pyx_L0;
30698 
30699  /* "View.MemoryView":1080
30700  *
30701  * @cname('__pyx_memoryview_copy_object')
30702  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
30703  * "Create a new memoryview object"
30704  * cdef __Pyx_memviewslice memviewslice
30705  */
30706 
30707  /* function exit code */
30708  __pyx_L1_error:;
30709  __Pyx_XDECREF(__pyx_t_1);
30710  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
30711  __pyx_r = 0;
30712  __pyx_L0:;
30713  __Pyx_XGIVEREF(__pyx_r);
30714  __Pyx_RefNannyFinishContext();
30715  return __pyx_r;
30716 }
30717 
30718 /* "View.MemoryView":1087
30719  *
30720  * @cname('__pyx_memoryview_copy_object_from_slice')
30721  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
30722  * """
30723  * Create a new memoryview object from a given memoryview object and slice.
30724  */
30725 
30726 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
30727  PyObject *(*__pyx_v_to_object_func)(char *);
30728  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
30729  PyObject *__pyx_r = NULL;
30730  __Pyx_RefNannyDeclarations
30731  int __pyx_t_1;
30732  int __pyx_t_2;
30733  PyObject *(*__pyx_t_3)(char *);
30734  int (*__pyx_t_4)(char *, PyObject *);
30735  PyObject *__pyx_t_5 = NULL;
30736  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
30737 
30738  /* "View.MemoryView":1094
30739  * cdef int (*to_dtype_func)(char *, object) except 0
30740  *
30741  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30742  * to_object_func = (<_memoryviewslice> memview).to_object_func
30743  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30744  */
30745  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
30746  __pyx_t_2 = (__pyx_t_1 != 0);
30747  if (__pyx_t_2) {
30748 
30749  /* "View.MemoryView":1095
30750  *
30751  * if isinstance(memview, _memoryviewslice):
30752  * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
30753  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30754  * else:
30755  */
30756  __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
30757  __pyx_v_to_object_func = __pyx_t_3;
30758 
30759  /* "View.MemoryView":1096
30760  * if isinstance(memview, _memoryviewslice):
30761  * to_object_func = (<_memoryviewslice> memview).to_object_func
30762  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
30763  * else:
30764  * to_object_func = NULL
30765  */
30766  __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
30767  __pyx_v_to_dtype_func = __pyx_t_4;
30768 
30769  /* "View.MemoryView":1094
30770  * cdef int (*to_dtype_func)(char *, object) except 0
30771  *
30772  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30773  * to_object_func = (<_memoryviewslice> memview).to_object_func
30774  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30775  */
30776  goto __pyx_L3;
30777  }
30778 
30779  /* "View.MemoryView":1098
30780  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30781  * else:
30782  * to_object_func = NULL # <<<<<<<<<<<<<<
30783  * to_dtype_func = NULL
30784  *
30785  */
30786  /*else*/ {
30787  __pyx_v_to_object_func = NULL;
30788 
30789  /* "View.MemoryView":1099
30790  * else:
30791  * to_object_func = NULL
30792  * to_dtype_func = NULL # <<<<<<<<<<<<<<
30793  *
30794  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
30795  */
30796  __pyx_v_to_dtype_func = NULL;
30797  }
30798  __pyx_L3:;
30799 
30800  /* "View.MemoryView":1101
30801  * to_dtype_func = NULL
30802  *
30803  * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
30804  * to_object_func, to_dtype_func,
30805  * memview.dtype_is_object)
30806  */
30807  __Pyx_XDECREF(__pyx_r);
30808 
30809  /* "View.MemoryView":1103
30810  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
30811  * to_object_func, to_dtype_func,
30812  * memview.dtype_is_object) # <<<<<<<<<<<<<<
30813  *
30814  *
30815  */
30816  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
30817  __Pyx_GOTREF(__pyx_t_5);
30818  __pyx_r = __pyx_t_5;
30819  __pyx_t_5 = 0;
30820  goto __pyx_L0;
30821 
30822  /* "View.MemoryView":1087
30823  *
30824  * @cname('__pyx_memoryview_copy_object_from_slice')
30825  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
30826  * """
30827  * Create a new memoryview object from a given memoryview object and slice.
30828  */
30829 
30830  /* function exit code */
30831  __pyx_L1_error:;
30832  __Pyx_XDECREF(__pyx_t_5);
30833  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
30834  __pyx_r = 0;
30835  __pyx_L0:;
30836  __Pyx_XGIVEREF(__pyx_r);
30837  __Pyx_RefNannyFinishContext();
30838  return __pyx_r;
30839 }
30840 
30841 /* "View.MemoryView":1109
30842  *
30843  *
30844  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
30845  * if arg < 0:
30846  * return -arg
30847  */
30848 
30849 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
30850  Py_ssize_t __pyx_r;
30851  int __pyx_t_1;
30852 
30853  /* "View.MemoryView":1110
30854  *
30855  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30856  * if arg < 0: # <<<<<<<<<<<<<<
30857  * return -arg
30858  * else:
30859  */
30860  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
30861  if (__pyx_t_1) {
30862 
30863  /* "View.MemoryView":1111
30864  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30865  * if arg < 0:
30866  * return -arg # <<<<<<<<<<<<<<
30867  * else:
30868  * return arg
30869  */
30870  __pyx_r = (-__pyx_v_arg);
30871  goto __pyx_L0;
30872 
30873  /* "View.MemoryView":1110
30874  *
30875  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30876  * if arg < 0: # <<<<<<<<<<<<<<
30877  * return -arg
30878  * else:
30879  */
30880  }
30881 
30882  /* "View.MemoryView":1113
30883  * return -arg
30884  * else:
30885  * return arg # <<<<<<<<<<<<<<
30886  *
30887  * @cname('__pyx_get_best_slice_order')
30888  */
30889  /*else*/ {
30890  __pyx_r = __pyx_v_arg;
30891  goto __pyx_L0;
30892  }
30893 
30894  /* "View.MemoryView":1109
30895  *
30896  *
30897  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
30898  * if arg < 0:
30899  * return -arg
30900  */
30901 
30902  /* function exit code */
30903  __pyx_L0:;
30904  return __pyx_r;
30905 }
30906 
30907 /* "View.MemoryView":1116
30908  *
30909  * @cname('__pyx_get_best_slice_order')
30910  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
30911  * """
30912  * Figure out the best memory access order for a given slice.
30913  */
30914 
30915 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
30916  int __pyx_v_i;
30917  Py_ssize_t __pyx_v_c_stride;
30918  Py_ssize_t __pyx_v_f_stride;
30919  char __pyx_r;
30920  int __pyx_t_1;
30921  int __pyx_t_2;
30922  int __pyx_t_3;
30923  int __pyx_t_4;
30924 
30925  /* "View.MemoryView":1121
30926  * """
30927  * cdef int i
30928  * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
30929  * cdef Py_ssize_t f_stride = 0
30930  *
30931  */
30932  __pyx_v_c_stride = 0;
30933 
30934  /* "View.MemoryView":1122
30935  * cdef int i
30936  * cdef Py_ssize_t c_stride = 0
30937  * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
30938  *
30939  * for i in range(ndim - 1, -1, -1):
30940  */
30941  __pyx_v_f_stride = 0;
30942 
30943  /* "View.MemoryView":1124
30944  * cdef Py_ssize_t f_stride = 0
30945  *
30946  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
30947  * if mslice.shape[i] > 1:
30948  * c_stride = mslice.strides[i]
30949  */
30950  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
30951  __pyx_v_i = __pyx_t_1;
30952 
30953  /* "View.MemoryView":1125
30954  *
30955  * for i in range(ndim - 1, -1, -1):
30956  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30957  * c_stride = mslice.strides[i]
30958  * break
30959  */
30960  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
30961  if (__pyx_t_2) {
30962 
30963  /* "View.MemoryView":1126
30964  * for i in range(ndim - 1, -1, -1):
30965  * if mslice.shape[i] > 1:
30966  * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
30967  * break
30968  *
30969  */
30970  __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
30971 
30972  /* "View.MemoryView":1127
30973  * if mslice.shape[i] > 1:
30974  * c_stride = mslice.strides[i]
30975  * break # <<<<<<<<<<<<<<
30976  *
30977  * for i in range(ndim):
30978  */
30979  goto __pyx_L4_break;
30980 
30981  /* "View.MemoryView":1125
30982  *
30983  * for i in range(ndim - 1, -1, -1):
30984  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30985  * c_stride = mslice.strides[i]
30986  * break
30987  */
30988  }
30989  }
30990  __pyx_L4_break:;
30991 
30992  /* "View.MemoryView":1129
30993  * break
30994  *
30995  * for i in range(ndim): # <<<<<<<<<<<<<<
30996  * if mslice.shape[i] > 1:
30997  * f_stride = mslice.strides[i]
30998  */
30999  __pyx_t_1 = __pyx_v_ndim;
31000  __pyx_t_3 = __pyx_t_1;
31001  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31002  __pyx_v_i = __pyx_t_4;
31003 
31004  /* "View.MemoryView":1130
31005  *
31006  * for i in range(ndim):
31007  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
31008  * f_stride = mslice.strides[i]
31009  * break
31010  */
31011  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
31012  if (__pyx_t_2) {
31013 
31014  /* "View.MemoryView":1131
31015  * for i in range(ndim):
31016  * if mslice.shape[i] > 1:
31017  * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
31018  * break
31019  *
31020  */
31021  __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
31022 
31023  /* "View.MemoryView":1132
31024  * if mslice.shape[i] > 1:
31025  * f_stride = mslice.strides[i]
31026  * break # <<<<<<<<<<<<<<
31027  *
31028  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
31029  */
31030  goto __pyx_L7_break;
31031 
31032  /* "View.MemoryView":1130
31033  *
31034  * for i in range(ndim):
31035  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
31036  * f_stride = mslice.strides[i]
31037  * break
31038  */
31039  }
31040  }
31041  __pyx_L7_break:;
31042 
31043  /* "View.MemoryView":1134
31044  * break
31045  *
31046  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
31047  * return 'C'
31048  * else:
31049  */
31050  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
31051  if (__pyx_t_2) {
31052 
31053  /* "View.MemoryView":1135
31054  *
31055  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
31056  * return 'C' # <<<<<<<<<<<<<<
31057  * else:
31058  * return 'F'
31059  */
31060  __pyx_r = 'C';
31061  goto __pyx_L0;
31062 
31063  /* "View.MemoryView":1134
31064  * break
31065  *
31066  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
31067  * return 'C'
31068  * else:
31069  */
31070  }
31071 
31072  /* "View.MemoryView":1137
31073  * return 'C'
31074  * else:
31075  * return 'F' # <<<<<<<<<<<<<<
31076  *
31077  * @cython.cdivision(True)
31078  */
31079  /*else*/ {
31080  __pyx_r = 'F';
31081  goto __pyx_L0;
31082  }
31083 
31084  /* "View.MemoryView":1116
31085  *
31086  * @cname('__pyx_get_best_slice_order')
31087  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
31088  * """
31089  * Figure out the best memory access order for a given slice.
31090  */
31091 
31092  /* function exit code */
31093  __pyx_L0:;
31094  return __pyx_r;
31095 }
31096 
31097 /* "View.MemoryView":1140
31098  *
31099  * @cython.cdivision(True)
31100  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
31101  * char *dst_data, Py_ssize_t *dst_strides,
31102  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
31103  */
31104 
31105 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
31106  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
31107  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
31108  Py_ssize_t __pyx_v_dst_extent;
31109  Py_ssize_t __pyx_v_src_stride;
31110  Py_ssize_t __pyx_v_dst_stride;
31111  int __pyx_t_1;
31112  int __pyx_t_2;
31113  int __pyx_t_3;
31114  Py_ssize_t __pyx_t_4;
31115  Py_ssize_t __pyx_t_5;
31116  Py_ssize_t __pyx_t_6;
31117 
31118  /* "View.MemoryView":1147
31119  *
31120  * cdef Py_ssize_t i
31121  * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
31122  * cdef Py_ssize_t dst_extent = dst_shape[0]
31123  * cdef Py_ssize_t src_stride = src_strides[0]
31124  */
31125  __pyx_v_src_extent = (__pyx_v_src_shape[0]);
31126 
31127  /* "View.MemoryView":1148
31128  * cdef Py_ssize_t i
31129  * cdef Py_ssize_t src_extent = src_shape[0]
31130  * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
31131  * cdef Py_ssize_t src_stride = src_strides[0]
31132  * cdef Py_ssize_t dst_stride = dst_strides[0]
31133  */
31134  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
31135 
31136  /* "View.MemoryView":1149
31137  * cdef Py_ssize_t src_extent = src_shape[0]
31138  * cdef Py_ssize_t dst_extent = dst_shape[0]
31139  * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
31140  * cdef Py_ssize_t dst_stride = dst_strides[0]
31141  *
31142  */
31143  __pyx_v_src_stride = (__pyx_v_src_strides[0]);
31144 
31145  /* "View.MemoryView":1150
31146  * cdef Py_ssize_t dst_extent = dst_shape[0]
31147  * cdef Py_ssize_t src_stride = src_strides[0]
31148  * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
31149  *
31150  * if ndim == 1:
31151  */
31152  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
31153 
31154  /* "View.MemoryView":1152
31155  * cdef Py_ssize_t dst_stride = dst_strides[0]
31156  *
31157  * if ndim == 1: # <<<<<<<<<<<<<<
31158  * if (src_stride > 0 and dst_stride > 0 and
31159  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31160  */
31161  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
31162  if (__pyx_t_1) {
31163 
31164  /* "View.MemoryView":1153
31165  *
31166  * if ndim == 1:
31167  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
31168  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31169  * memcpy(dst_data, src_data, itemsize * dst_extent)
31170  */
31171  __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
31172  if (__pyx_t_2) {
31173  } else {
31174  __pyx_t_1 = __pyx_t_2;
31175  goto __pyx_L5_bool_binop_done;
31176  }
31177  __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
31178  if (__pyx_t_2) {
31179  } else {
31180  __pyx_t_1 = __pyx_t_2;
31181  goto __pyx_L5_bool_binop_done;
31182  }
31183 
31184  /* "View.MemoryView":1154
31185  * if ndim == 1:
31186  * if (src_stride > 0 and dst_stride > 0 and
31187  * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
31188  * memcpy(dst_data, src_data, itemsize * dst_extent)
31189  * else:
31190  */
31191  __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
31192  if (__pyx_t_2) {
31193  __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
31194  }
31195  __pyx_t_3 = (__pyx_t_2 != 0);
31196  __pyx_t_1 = __pyx_t_3;
31197  __pyx_L5_bool_binop_done:;
31198 
31199  /* "View.MemoryView":1153
31200  *
31201  * if ndim == 1:
31202  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
31203  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31204  * memcpy(dst_data, src_data, itemsize * dst_extent)
31205  */
31206  if (__pyx_t_1) {
31207 
31208  /* "View.MemoryView":1155
31209  * if (src_stride > 0 and dst_stride > 0 and
31210  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31211  * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
31212  * else:
31213  * for i in range(dst_extent):
31214  */
31215  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
31216 
31217  /* "View.MemoryView":1153
31218  *
31219  * if ndim == 1:
31220  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
31221  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31222  * memcpy(dst_data, src_data, itemsize * dst_extent)
31223  */
31224  goto __pyx_L4;
31225  }
31226 
31227  /* "View.MemoryView":1157
31228  * memcpy(dst_data, src_data, itemsize * dst_extent)
31229  * else:
31230  * for i in range(dst_extent): # <<<<<<<<<<<<<<
31231  * memcpy(dst_data, src_data, itemsize)
31232  * src_data += src_stride
31233  */
31234  /*else*/ {
31235  __pyx_t_4 = __pyx_v_dst_extent;
31236  __pyx_t_5 = __pyx_t_4;
31237  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31238  __pyx_v_i = __pyx_t_6;
31239 
31240  /* "View.MemoryView":1158
31241  * else:
31242  * for i in range(dst_extent):
31243  * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
31244  * src_data += src_stride
31245  * dst_data += dst_stride
31246  */
31247  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
31248 
31249  /* "View.MemoryView":1159
31250  * for i in range(dst_extent):
31251  * memcpy(dst_data, src_data, itemsize)
31252  * src_data += src_stride # <<<<<<<<<<<<<<
31253  * dst_data += dst_stride
31254  * else:
31255  */
31256  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
31257 
31258  /* "View.MemoryView":1160
31259  * memcpy(dst_data, src_data, itemsize)
31260  * src_data += src_stride
31261  * dst_data += dst_stride # <<<<<<<<<<<<<<
31262  * else:
31263  * for i in range(dst_extent):
31264  */
31265  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
31266  }
31267  }
31268  __pyx_L4:;
31269 
31270  /* "View.MemoryView":1152
31271  * cdef Py_ssize_t dst_stride = dst_strides[0]
31272  *
31273  * if ndim == 1: # <<<<<<<<<<<<<<
31274  * if (src_stride > 0 and dst_stride > 0 and
31275  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31276  */
31277  goto __pyx_L3;
31278  }
31279 
31280  /* "View.MemoryView":1162
31281  * dst_data += dst_stride
31282  * else:
31283  * for i in range(dst_extent): # <<<<<<<<<<<<<<
31284  * _copy_strided_to_strided(src_data, src_strides + 1,
31285  * dst_data, dst_strides + 1,
31286  */
31287  /*else*/ {
31288  __pyx_t_4 = __pyx_v_dst_extent;
31289  __pyx_t_5 = __pyx_t_4;
31290  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31291  __pyx_v_i = __pyx_t_6;
31292 
31293  /* "View.MemoryView":1163
31294  * else:
31295  * for i in range(dst_extent):
31296  * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
31297  * dst_data, dst_strides + 1,
31298  * src_shape + 1, dst_shape + 1,
31299  */
31300  _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
31301 
31302  /* "View.MemoryView":1167
31303  * src_shape + 1, dst_shape + 1,
31304  * ndim - 1, itemsize)
31305  * src_data += src_stride # <<<<<<<<<<<<<<
31306  * dst_data += dst_stride
31307  *
31308  */
31309  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
31310 
31311  /* "View.MemoryView":1168
31312  * ndim - 1, itemsize)
31313  * src_data += src_stride
31314  * dst_data += dst_stride # <<<<<<<<<<<<<<
31315  *
31316  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
31317  */
31318  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
31319  }
31320  }
31321  __pyx_L3:;
31322 
31323  /* "View.MemoryView":1140
31324  *
31325  * @cython.cdivision(True)
31326  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
31327  * char *dst_data, Py_ssize_t *dst_strides,
31328  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
31329  */
31330 
31331  /* function exit code */
31332 }
31333 
31334 /* "View.MemoryView":1170
31335  * dst_data += dst_stride
31336  *
31337  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31338  * __Pyx_memviewslice *dst,
31339  * int ndim, size_t itemsize) nogil:
31340  */
31341 
31342 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
31343 
31344  /* "View.MemoryView":1173
31345  * __Pyx_memviewslice *dst,
31346  * int ndim, size_t itemsize) nogil:
31347  * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
31348  * src.shape, dst.shape, ndim, itemsize)
31349  *
31350  */
31351  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
31352 
31353  /* "View.MemoryView":1170
31354  * dst_data += dst_stride
31355  *
31356  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31357  * __Pyx_memviewslice *dst,
31358  * int ndim, size_t itemsize) nogil:
31359  */
31360 
31361  /* function exit code */
31362 }
31363 
31364 /* "View.MemoryView":1177
31365  *
31366  * @cname('__pyx_memoryview_slice_get_size')
31367  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
31368  * "Return the size of the memory occupied by the slice in number of bytes"
31369  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
31370  */
31371 
31372 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
31373  Py_ssize_t __pyx_v_shape;
31374  Py_ssize_t __pyx_v_size;
31375  Py_ssize_t __pyx_r;
31376  Py_ssize_t __pyx_t_1;
31377  Py_ssize_t *__pyx_t_2;
31378  Py_ssize_t *__pyx_t_3;
31379  Py_ssize_t *__pyx_t_4;
31380 
31381  /* "View.MemoryView":1179
31382  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
31383  * "Return the size of the memory occupied by the slice in number of bytes"
31384  * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
31385  *
31386  * for shape in src.shape[:ndim]:
31387  */
31388  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
31389  __pyx_v_size = __pyx_t_1;
31390 
31391  /* "View.MemoryView":1181
31392  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
31393  *
31394  * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
31395  * size *= shape
31396  *
31397  */
31398  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
31399  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
31400  __pyx_t_2 = __pyx_t_4;
31401  __pyx_v_shape = (__pyx_t_2[0]);
31402 
31403  /* "View.MemoryView":1182
31404  *
31405  * for shape in src.shape[:ndim]:
31406  * size *= shape # <<<<<<<<<<<<<<
31407  *
31408  * return size
31409  */
31410  __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
31411  }
31412 
31413  /* "View.MemoryView":1184
31414  * size *= shape
31415  *
31416  * return size # <<<<<<<<<<<<<<
31417  *
31418  * @cname('__pyx_fill_contig_strides_array')
31419  */
31420  __pyx_r = __pyx_v_size;
31421  goto __pyx_L0;
31422 
31423  /* "View.MemoryView":1177
31424  *
31425  * @cname('__pyx_memoryview_slice_get_size')
31426  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
31427  * "Return the size of the memory occupied by the slice in number of bytes"
31428  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
31429  */
31430 
31431  /* function exit code */
31432  __pyx_L0:;
31433  return __pyx_r;
31434 }
31435 
31436 /* "View.MemoryView":1187
31437  *
31438  * @cname('__pyx_fill_contig_strides_array')
31439  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
31440  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
31441  * int ndim, char order) nogil:
31442  */
31443 
31444 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
31445  int __pyx_v_idx;
31446  Py_ssize_t __pyx_r;
31447  int __pyx_t_1;
31448  int __pyx_t_2;
31449  int __pyx_t_3;
31450  int __pyx_t_4;
31451 
31452  /* "View.MemoryView":1196
31453  * cdef int idx
31454  *
31455  * if order == 'F': # <<<<<<<<<<<<<<
31456  * for idx in range(ndim):
31457  * strides[idx] = stride
31458  */
31459  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
31460  if (__pyx_t_1) {
31461 
31462  /* "View.MemoryView":1197
31463  *
31464  * if order == 'F':
31465  * for idx in range(ndim): # <<<<<<<<<<<<<<
31466  * strides[idx] = stride
31467  * stride *= shape[idx]
31468  */
31469  __pyx_t_2 = __pyx_v_ndim;
31470  __pyx_t_3 = __pyx_t_2;
31471  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31472  __pyx_v_idx = __pyx_t_4;
31473 
31474  /* "View.MemoryView":1198
31475  * if order == 'F':
31476  * for idx in range(ndim):
31477  * strides[idx] = stride # <<<<<<<<<<<<<<
31478  * stride *= shape[idx]
31479  * else:
31480  */
31481  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
31482 
31483  /* "View.MemoryView":1199
31484  * for idx in range(ndim):
31485  * strides[idx] = stride
31486  * stride *= shape[idx] # <<<<<<<<<<<<<<
31487  * else:
31488  * for idx in range(ndim - 1, -1, -1):
31489  */
31490  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
31491  }
31492 
31493  /* "View.MemoryView":1196
31494  * cdef int idx
31495  *
31496  * if order == 'F': # <<<<<<<<<<<<<<
31497  * for idx in range(ndim):
31498  * strides[idx] = stride
31499  */
31500  goto __pyx_L3;
31501  }
31502 
31503  /* "View.MemoryView":1201
31504  * stride *= shape[idx]
31505  * else:
31506  * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
31507  * strides[idx] = stride
31508  * stride *= shape[idx]
31509  */
31510  /*else*/ {
31511  for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
31512  __pyx_v_idx = __pyx_t_2;
31513 
31514  /* "View.MemoryView":1202
31515  * else:
31516  * for idx in range(ndim - 1, -1, -1):
31517  * strides[idx] = stride # <<<<<<<<<<<<<<
31518  * stride *= shape[idx]
31519  *
31520  */
31521  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
31522 
31523  /* "View.MemoryView":1203
31524  * for idx in range(ndim - 1, -1, -1):
31525  * strides[idx] = stride
31526  * stride *= shape[idx] # <<<<<<<<<<<<<<
31527  *
31528  * return stride
31529  */
31530  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
31531  }
31532  }
31533  __pyx_L3:;
31534 
31535  /* "View.MemoryView":1205
31536  * stride *= shape[idx]
31537  *
31538  * return stride # <<<<<<<<<<<<<<
31539  *
31540  * @cname('__pyx_memoryview_copy_data_to_temp')
31541  */
31542  __pyx_r = __pyx_v_stride;
31543  goto __pyx_L0;
31544 
31545  /* "View.MemoryView":1187
31546  *
31547  * @cname('__pyx_fill_contig_strides_array')
31548  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
31549  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
31550  * int ndim, char order) nogil:
31551  */
31552 
31553  /* function exit code */
31554  __pyx_L0:;
31555  return __pyx_r;
31556 }
31557 
31558 /* "View.MemoryView":1208
31559  *
31560  * @cname('__pyx_memoryview_copy_data_to_temp')
31561  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31562  * __Pyx_memviewslice *tmpslice,
31563  * char order,
31564  */
31565 
31566 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
31567  int __pyx_v_i;
31568  void *__pyx_v_result;
31569  size_t __pyx_v_itemsize;
31570  size_t __pyx_v_size;
31571  void *__pyx_r;
31572  Py_ssize_t __pyx_t_1;
31573  int __pyx_t_2;
31574  int __pyx_t_3;
31575  struct __pyx_memoryview_obj *__pyx_t_4;
31576  int __pyx_t_5;
31577  int __pyx_t_6;
31578 
31579  /* "View.MemoryView":1219
31580  * cdef void *result
31581  *
31582  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
31583  * cdef size_t size = slice_get_size(src, ndim)
31584  *
31585  */
31586  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
31587  __pyx_v_itemsize = __pyx_t_1;
31588 
31589  /* "View.MemoryView":1220
31590  *
31591  * cdef size_t itemsize = src.memview.view.itemsize
31592  * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
31593  *
31594  * result = malloc(size)
31595  */
31596  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
31597 
31598  /* "View.MemoryView":1222
31599  * cdef size_t size = slice_get_size(src, ndim)
31600  *
31601  * result = malloc(size) # <<<<<<<<<<<<<<
31602  * if not result:
31603  * _err(MemoryError, NULL)
31604  */
31605  __pyx_v_result = malloc(__pyx_v_size);
31606 
31607  /* "View.MemoryView":1223
31608  *
31609  * result = malloc(size)
31610  * if not result: # <<<<<<<<<<<<<<
31611  * _err(MemoryError, NULL)
31612  *
31613  */
31614  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
31615  if (__pyx_t_2) {
31616 
31617  /* "View.MemoryView":1224
31618  * result = malloc(size)
31619  * if not result:
31620  * _err(MemoryError, NULL) # <<<<<<<<<<<<<<
31621  *
31622  *
31623  */
31624  __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1224, __pyx_L1_error)
31625 
31626  /* "View.MemoryView":1223
31627  *
31628  * result = malloc(size)
31629  * if not result: # <<<<<<<<<<<<<<
31630  * _err(MemoryError, NULL)
31631  *
31632  */
31633  }
31634 
31635  /* "View.MemoryView":1227
31636  *
31637  *
31638  * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
31639  * tmpslice.memview = src.memview
31640  * for i in range(ndim):
31641  */
31642  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
31643 
31644  /* "View.MemoryView":1228
31645  *
31646  * tmpslice.data = <char *> result
31647  * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
31648  * for i in range(ndim):
31649  * tmpslice.shape[i] = src.shape[i]
31650  */
31651  __pyx_t_4 = __pyx_v_src->memview;
31652  __pyx_v_tmpslice->memview = __pyx_t_4;
31653 
31654  /* "View.MemoryView":1229
31655  * tmpslice.data = <char *> result
31656  * tmpslice.memview = src.memview
31657  * for i in range(ndim): # <<<<<<<<<<<<<<
31658  * tmpslice.shape[i] = src.shape[i]
31659  * tmpslice.suboffsets[i] = -1
31660  */
31661  __pyx_t_3 = __pyx_v_ndim;
31662  __pyx_t_5 = __pyx_t_3;
31663  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31664  __pyx_v_i = __pyx_t_6;
31665 
31666  /* "View.MemoryView":1230
31667  * tmpslice.memview = src.memview
31668  * for i in range(ndim):
31669  * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
31670  * tmpslice.suboffsets[i] = -1
31671  *
31672  */
31673  (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
31674 
31675  /* "View.MemoryView":1231
31676  * for i in range(ndim):
31677  * tmpslice.shape[i] = src.shape[i]
31678  * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
31679  *
31680  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
31681  */
31682  (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
31683  }
31684 
31685  /* "View.MemoryView":1233
31686  * tmpslice.suboffsets[i] = -1
31687  *
31688  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
31689  * ndim, order)
31690  *
31691  */
31692  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
31693 
31694  /* "View.MemoryView":1237
31695  *
31696  *
31697  * for i in range(ndim): # <<<<<<<<<<<<<<
31698  * if tmpslice.shape[i] == 1:
31699  * tmpslice.strides[i] = 0
31700  */
31701  __pyx_t_3 = __pyx_v_ndim;
31702  __pyx_t_5 = __pyx_t_3;
31703  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31704  __pyx_v_i = __pyx_t_6;
31705 
31706  /* "View.MemoryView":1238
31707  *
31708  * for i in range(ndim):
31709  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
31710  * tmpslice.strides[i] = 0
31711  *
31712  */
31713  __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
31714  if (__pyx_t_2) {
31715 
31716  /* "View.MemoryView":1239
31717  * for i in range(ndim):
31718  * if tmpslice.shape[i] == 1:
31719  * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
31720  *
31721  * if slice_is_contig(src[0], order, ndim):
31722  */
31723  (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
31724 
31725  /* "View.MemoryView":1238
31726  *
31727  * for i in range(ndim):
31728  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
31729  * tmpslice.strides[i] = 0
31730  *
31731  */
31732  }
31733  }
31734 
31735  /* "View.MemoryView":1241
31736  * tmpslice.strides[i] = 0
31737  *
31738  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
31739  * memcpy(result, src.data, size)
31740  * else:
31741  */
31742  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
31743  if (__pyx_t_2) {
31744 
31745  /* "View.MemoryView":1242
31746  *
31747  * if slice_is_contig(src[0], order, ndim):
31748  * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
31749  * else:
31750  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
31751  */
31752  (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
31753 
31754  /* "View.MemoryView":1241
31755  * tmpslice.strides[i] = 0
31756  *
31757  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
31758  * memcpy(result, src.data, size)
31759  * else:
31760  */
31761  goto __pyx_L9;
31762  }
31763 
31764  /* "View.MemoryView":1244
31765  * memcpy(result, src.data, size)
31766  * else:
31767  * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
31768  *
31769  * return result
31770  */
31771  /*else*/ {
31772  copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
31773  }
31774  __pyx_L9:;
31775 
31776  /* "View.MemoryView":1246
31777  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
31778  *
31779  * return result # <<<<<<<<<<<<<<
31780  *
31781  *
31782  */
31783  __pyx_r = __pyx_v_result;
31784  goto __pyx_L0;
31785 
31786  /* "View.MemoryView":1208
31787  *
31788  * @cname('__pyx_memoryview_copy_data_to_temp')
31789  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31790  * __Pyx_memviewslice *tmpslice,
31791  * char order,
31792  */
31793 
31794  /* function exit code */
31795  __pyx_L1_error:;
31796  {
31797  #ifdef WITH_THREAD
31798  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31799  #endif
31800  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
31801  #ifdef WITH_THREAD
31802  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31803  #endif
31804  }
31805  __pyx_r = NULL;
31806  __pyx_L0:;
31807  return __pyx_r;
31808 }
31809 
31810 /* "View.MemoryView":1251
31811  *
31812  * @cname('__pyx_memoryview_err_extents')
31813  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
31814  * Py_ssize_t extent2) except -1 with gil:
31815  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31816  */
31817 
31818 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
31819  int __pyx_r;
31820  __Pyx_RefNannyDeclarations
31821  PyObject *__pyx_t_1 = NULL;
31822  PyObject *__pyx_t_2 = NULL;
31823  PyObject *__pyx_t_3 = NULL;
31824  PyObject *__pyx_t_4 = NULL;
31825  #ifdef WITH_THREAD
31826  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31827  #endif
31828  __Pyx_RefNannySetupContext("_err_extents", 0);
31829 
31830  /* "View.MemoryView":1254
31831  * Py_ssize_t extent2) except -1 with gil:
31832  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31833  * (i, extent1, extent2)) # <<<<<<<<<<<<<<
31834  *
31835  * @cname('__pyx_memoryview_err_dim')
31836  */
31837  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
31838  __Pyx_GOTREF(__pyx_t_1);
31839  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
31840  __Pyx_GOTREF(__pyx_t_2);
31841  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
31842  __Pyx_GOTREF(__pyx_t_3);
31843  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error)
31844  __Pyx_GOTREF(__pyx_t_4);
31845  __Pyx_GIVEREF(__pyx_t_1);
31846  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
31847  __Pyx_GIVEREF(__pyx_t_2);
31848  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
31849  __Pyx_GIVEREF(__pyx_t_3);
31850  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
31851  __pyx_t_1 = 0;
31852  __pyx_t_2 = 0;
31853  __pyx_t_3 = 0;
31854 
31855  /* "View.MemoryView":1253
31856  * cdef int _err_extents(int i, Py_ssize_t extent1,
31857  * Py_ssize_t extent2) except -1 with gil:
31858  * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
31859  * (i, extent1, extent2))
31860  *
31861  */
31862  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
31863  __Pyx_GOTREF(__pyx_t_3);
31864  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31865  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error)
31866  __Pyx_GOTREF(__pyx_t_4);
31867  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31868  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
31869  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31870  __PYX_ERR(0, 1253, __pyx_L1_error)
31871 
31872  /* "View.MemoryView":1251
31873  *
31874  * @cname('__pyx_memoryview_err_extents')
31875  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
31876  * Py_ssize_t extent2) except -1 with gil:
31877  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31878  */
31879 
31880  /* function exit code */
31881  __pyx_L1_error:;
31882  __Pyx_XDECREF(__pyx_t_1);
31883  __Pyx_XDECREF(__pyx_t_2);
31884  __Pyx_XDECREF(__pyx_t_3);
31885  __Pyx_XDECREF(__pyx_t_4);
31886  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
31887  __pyx_r = -1;
31888  __Pyx_RefNannyFinishContext();
31889  #ifdef WITH_THREAD
31890  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31891  #endif
31892  return __pyx_r;
31893 }
31894 
31895 /* "View.MemoryView":1257
31896  *
31897  * @cname('__pyx_memoryview_err_dim')
31898  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
31899  * raise error(msg.decode('ascii') % dim)
31900  *
31901  */
31902 
31903 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
31904  int __pyx_r;
31905  __Pyx_RefNannyDeclarations
31906  PyObject *__pyx_t_1 = NULL;
31907  PyObject *__pyx_t_2 = NULL;
31908  PyObject *__pyx_t_3 = NULL;
31909  PyObject *__pyx_t_4 = NULL;
31910  #ifdef WITH_THREAD
31911  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31912  #endif
31913  __Pyx_RefNannySetupContext("_err_dim", 0);
31914  __Pyx_INCREF(__pyx_v_error);
31915 
31916  /* "View.MemoryView":1258
31917  * @cname('__pyx_memoryview_err_dim')
31918  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
31919  * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
31920  *
31921  * @cname('__pyx_memoryview_err')
31922  */
31923  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
31924  __Pyx_GOTREF(__pyx_t_2);
31925  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error)
31926  __Pyx_GOTREF(__pyx_t_3);
31927  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error)
31928  __Pyx_GOTREF(__pyx_t_4);
31929  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31930  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31931  __Pyx_INCREF(__pyx_v_error);
31932  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
31933  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
31934  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
31935  if (likely(__pyx_t_2)) {
31936  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
31937  __Pyx_INCREF(__pyx_t_2);
31938  __Pyx_INCREF(function);
31939  __Pyx_DECREF_SET(__pyx_t_3, function);
31940  }
31941  }
31942  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
31943  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
31944  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31945  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
31946  __Pyx_GOTREF(__pyx_t_1);
31947  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31948  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
31949  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31950  __PYX_ERR(0, 1258, __pyx_L1_error)
31951 
31952  /* "View.MemoryView":1257
31953  *
31954  * @cname('__pyx_memoryview_err_dim')
31955  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
31956  * raise error(msg.decode('ascii') % dim)
31957  *
31958  */
31959 
31960  /* function exit code */
31961  __pyx_L1_error:;
31962  __Pyx_XDECREF(__pyx_t_1);
31963  __Pyx_XDECREF(__pyx_t_2);
31964  __Pyx_XDECREF(__pyx_t_3);
31965  __Pyx_XDECREF(__pyx_t_4);
31966  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
31967  __pyx_r = -1;
31968  __Pyx_XDECREF(__pyx_v_error);
31969  __Pyx_RefNannyFinishContext();
31970  #ifdef WITH_THREAD
31971  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31972  #endif
31973  return __pyx_r;
31974 }
31975 
31976 /* "View.MemoryView":1261
31977  *
31978  * @cname('__pyx_memoryview_err')
31979  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
31980  * if msg != NULL:
31981  * raise error(msg.decode('ascii'))
31982  */
31983 
31984 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
31985  int __pyx_r;
31986  __Pyx_RefNannyDeclarations
31987  int __pyx_t_1;
31988  PyObject *__pyx_t_2 = NULL;
31989  PyObject *__pyx_t_3 = NULL;
31990  PyObject *__pyx_t_4 = NULL;
31991  PyObject *__pyx_t_5 = NULL;
31992  #ifdef WITH_THREAD
31993  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31994  #endif
31995  __Pyx_RefNannySetupContext("_err", 0);
31996  __Pyx_INCREF(__pyx_v_error);
31997 
31998  /* "View.MemoryView":1262
31999  * @cname('__pyx_memoryview_err')
32000  * cdef int _err(object error, char *msg) except -1 with gil:
32001  * if msg != NULL: # <<<<<<<<<<<<<<
32002  * raise error(msg.decode('ascii'))
32003  * else:
32004  */
32005  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
32006  if (unlikely(__pyx_t_1)) {
32007 
32008  /* "View.MemoryView":1263
32009  * cdef int _err(object error, char *msg) except -1 with gil:
32010  * if msg != NULL:
32011  * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
32012  * else:
32013  * raise error
32014  */
32015  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
32016  __Pyx_GOTREF(__pyx_t_3);
32017  __Pyx_INCREF(__pyx_v_error);
32018  __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
32019  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
32020  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
32021  if (likely(__pyx_t_5)) {
32022  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
32023  __Pyx_INCREF(__pyx_t_5);
32024  __Pyx_INCREF(function);
32025  __Pyx_DECREF_SET(__pyx_t_4, function);
32026  }
32027  }
32028  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
32029  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
32030  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
32031  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error)
32032  __Pyx_GOTREF(__pyx_t_2);
32033  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32034  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
32035  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32036  __PYX_ERR(0, 1263, __pyx_L1_error)
32037 
32038  /* "View.MemoryView":1262
32039  * @cname('__pyx_memoryview_err')
32040  * cdef int _err(object error, char *msg) except -1 with gil:
32041  * if msg != NULL: # <<<<<<<<<<<<<<
32042  * raise error(msg.decode('ascii'))
32043  * else:
32044  */
32045  }
32046 
32047  /* "View.MemoryView":1265
32048  * raise error(msg.decode('ascii'))
32049  * else:
32050  * raise error # <<<<<<<<<<<<<<
32051  *
32052  * @cname('__pyx_memoryview_copy_contents')
32053  */
32054  /*else*/ {
32055  __Pyx_Raise(__pyx_v_error, 0, 0, 0);
32056  __PYX_ERR(0, 1265, __pyx_L1_error)
32057  }
32058 
32059  /* "View.MemoryView":1261
32060  *
32061  * @cname('__pyx_memoryview_err')
32062  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
32063  * if msg != NULL:
32064  * raise error(msg.decode('ascii'))
32065  */
32066 
32067  /* function exit code */
32068  __pyx_L1_error:;
32069  __Pyx_XDECREF(__pyx_t_2);
32070  __Pyx_XDECREF(__pyx_t_3);
32071  __Pyx_XDECREF(__pyx_t_4);
32072  __Pyx_XDECREF(__pyx_t_5);
32073  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
32074  __pyx_r = -1;
32075  __Pyx_XDECREF(__pyx_v_error);
32076  __Pyx_RefNannyFinishContext();
32077  #ifdef WITH_THREAD
32078  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32079  #endif
32080  return __pyx_r;
32081 }
32082 
32083 /* "View.MemoryView":1268
32084  *
32085  * @cname('__pyx_memoryview_copy_contents')
32086  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
32087  * __Pyx_memviewslice dst,
32088  * int src_ndim, int dst_ndim,
32089  */
32090 
32091 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
32092  void *__pyx_v_tmpdata;
32093  size_t __pyx_v_itemsize;
32094  int __pyx_v_i;
32095  char __pyx_v_order;
32096  int __pyx_v_broadcasting;
32097  int __pyx_v_direct_copy;
32098  __Pyx_memviewslice __pyx_v_tmp;
32099  int __pyx_v_ndim;
32100  int __pyx_r;
32101  Py_ssize_t __pyx_t_1;
32102  int __pyx_t_2;
32103  int __pyx_t_3;
32104  int __pyx_t_4;
32105  int __pyx_t_5;
32106  int __pyx_t_6;
32107  void *__pyx_t_7;
32108  int __pyx_t_8;
32109 
32110  /* "View.MemoryView":1276
32111  * Check for overlapping memory and verify the shapes.
32112  * """
32113  * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
32114  * cdef size_t itemsize = src.memview.view.itemsize
32115  * cdef int i
32116  */
32117  __pyx_v_tmpdata = NULL;
32118 
32119  /* "View.MemoryView":1277
32120  * """
32121  * cdef void *tmpdata = NULL
32122  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
32123  * cdef int i
32124  * cdef char order = get_best_order(&src, src_ndim)
32125  */
32126  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
32127  __pyx_v_itemsize = __pyx_t_1;
32128 
32129  /* "View.MemoryView":1279
32130  * cdef size_t itemsize = src.memview.view.itemsize
32131  * cdef int i
32132  * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
32133  * cdef bint broadcasting = False
32134  * cdef bint direct_copy = False
32135  */
32136  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
32137 
32138  /* "View.MemoryView":1280
32139  * cdef int i
32140  * cdef char order = get_best_order(&src, src_ndim)
32141  * cdef bint broadcasting = False # <<<<<<<<<<<<<<
32142  * cdef bint direct_copy = False
32143  * cdef __Pyx_memviewslice tmp
32144  */
32145  __pyx_v_broadcasting = 0;
32146 
32147  /* "View.MemoryView":1281
32148  * cdef char order = get_best_order(&src, src_ndim)
32149  * cdef bint broadcasting = False
32150  * cdef bint direct_copy = False # <<<<<<<<<<<<<<
32151  * cdef __Pyx_memviewslice tmp
32152  *
32153  */
32154  __pyx_v_direct_copy = 0;
32155 
32156  /* "View.MemoryView":1284
32157  * cdef __Pyx_memviewslice tmp
32158  *
32159  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
32160  * broadcast_leading(&src, src_ndim, dst_ndim)
32161  * elif dst_ndim < src_ndim:
32162  */
32163  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
32164  if (__pyx_t_2) {
32165 
32166  /* "View.MemoryView":1285
32167  *
32168  * if src_ndim < dst_ndim:
32169  * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
32170  * elif dst_ndim < src_ndim:
32171  * broadcast_leading(&dst, dst_ndim, src_ndim)
32172  */
32173  __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
32174 
32175  /* "View.MemoryView":1284
32176  * cdef __Pyx_memviewslice tmp
32177  *
32178  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
32179  * broadcast_leading(&src, src_ndim, dst_ndim)
32180  * elif dst_ndim < src_ndim:
32181  */
32182  goto __pyx_L3;
32183  }
32184 
32185  /* "View.MemoryView":1286
32186  * if src_ndim < dst_ndim:
32187  * broadcast_leading(&src, src_ndim, dst_ndim)
32188  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
32189  * broadcast_leading(&dst, dst_ndim, src_ndim)
32190  *
32191  */
32192  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
32193  if (__pyx_t_2) {
32194 
32195  /* "View.MemoryView":1287
32196  * broadcast_leading(&src, src_ndim, dst_ndim)
32197  * elif dst_ndim < src_ndim:
32198  * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
32199  *
32200  * cdef int ndim = max(src_ndim, dst_ndim)
32201  */
32202  __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
32203 
32204  /* "View.MemoryView":1286
32205  * if src_ndim < dst_ndim:
32206  * broadcast_leading(&src, src_ndim, dst_ndim)
32207  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
32208  * broadcast_leading(&dst, dst_ndim, src_ndim)
32209  *
32210  */
32211  }
32212  __pyx_L3:;
32213 
32214  /* "View.MemoryView":1289
32215  * broadcast_leading(&dst, dst_ndim, src_ndim)
32216  *
32217  * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
32218  *
32219  * for i in range(ndim):
32220  */
32221  __pyx_t_3 = __pyx_v_dst_ndim;
32222  __pyx_t_4 = __pyx_v_src_ndim;
32223  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
32224  __pyx_t_5 = __pyx_t_3;
32225  } else {
32226  __pyx_t_5 = __pyx_t_4;
32227  }
32228  __pyx_v_ndim = __pyx_t_5;
32229 
32230  /* "View.MemoryView":1291
32231  * cdef int ndim = max(src_ndim, dst_ndim)
32232  *
32233  * for i in range(ndim): # <<<<<<<<<<<<<<
32234  * if src.shape[i] != dst.shape[i]:
32235  * if src.shape[i] == 1:
32236  */
32237  __pyx_t_5 = __pyx_v_ndim;
32238  __pyx_t_3 = __pyx_t_5;
32239  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
32240  __pyx_v_i = __pyx_t_4;
32241 
32242  /* "View.MemoryView":1292
32243  *
32244  * for i in range(ndim):
32245  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
32246  * if src.shape[i] == 1:
32247  * broadcasting = True
32248  */
32249  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
32250  if (__pyx_t_2) {
32251 
32252  /* "View.MemoryView":1293
32253  * for i in range(ndim):
32254  * if src.shape[i] != dst.shape[i]:
32255  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
32256  * broadcasting = True
32257  * src.strides[i] = 0
32258  */
32259  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
32260  if (__pyx_t_2) {
32261 
32262  /* "View.MemoryView":1294
32263  * if src.shape[i] != dst.shape[i]:
32264  * if src.shape[i] == 1:
32265  * broadcasting = True # <<<<<<<<<<<<<<
32266  * src.strides[i] = 0
32267  * else:
32268  */
32269  __pyx_v_broadcasting = 1;
32270 
32271  /* "View.MemoryView":1295
32272  * if src.shape[i] == 1:
32273  * broadcasting = True
32274  * src.strides[i] = 0 # <<<<<<<<<<<<<<
32275  * else:
32276  * _err_extents(i, dst.shape[i], src.shape[i])
32277  */
32278  (__pyx_v_src.strides[__pyx_v_i]) = 0;
32279 
32280  /* "View.MemoryView":1293
32281  * for i in range(ndim):
32282  * if src.shape[i] != dst.shape[i]:
32283  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
32284  * broadcasting = True
32285  * src.strides[i] = 0
32286  */
32287  goto __pyx_L7;
32288  }
32289 
32290  /* "View.MemoryView":1297
32291  * src.strides[i] = 0
32292  * else:
32293  * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
32294  *
32295  * if src.suboffsets[i] >= 0:
32296  */
32297  /*else*/ {
32298  __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error)
32299  }
32300  __pyx_L7:;
32301 
32302  /* "View.MemoryView":1292
32303  *
32304  * for i in range(ndim):
32305  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
32306  * if src.shape[i] == 1:
32307  * broadcasting = True
32308  */
32309  }
32310 
32311  /* "View.MemoryView":1299
32312  * _err_extents(i, dst.shape[i], src.shape[i])
32313  *
32314  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
32315  * _err_dim(ValueError, "Dimension %d is not direct", i)
32316  *
32317  */
32318  __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
32319  if (__pyx_t_2) {
32320 
32321  /* "View.MemoryView":1300
32322  *
32323  * if src.suboffsets[i] >= 0:
32324  * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
32325  *
32326  * if slices_overlap(&src, &dst, ndim, itemsize):
32327  */
32328  __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1300, __pyx_L1_error)
32329 
32330  /* "View.MemoryView":1299
32331  * _err_extents(i, dst.shape[i], src.shape[i])
32332  *
32333  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
32334  * _err_dim(ValueError, "Dimension %d is not direct", i)
32335  *
32336  */
32337  }
32338  }
32339 
32340  /* "View.MemoryView":1302
32341  * _err_dim(ValueError, "Dimension %d is not direct", i)
32342  *
32343  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
32344  *
32345  * if not slice_is_contig(src, order, ndim):
32346  */
32347  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
32348  if (__pyx_t_2) {
32349 
32350  /* "View.MemoryView":1304
32351  * if slices_overlap(&src, &dst, ndim, itemsize):
32352  *
32353  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
32354  * order = get_best_order(&dst, ndim)
32355  *
32356  */
32357  __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
32358  if (__pyx_t_2) {
32359 
32360  /* "View.MemoryView":1305
32361  *
32362  * if not slice_is_contig(src, order, ndim):
32363  * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
32364  *
32365  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
32366  */
32367  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
32368 
32369  /* "View.MemoryView":1304
32370  * if slices_overlap(&src, &dst, ndim, itemsize):
32371  *
32372  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
32373  * order = get_best_order(&dst, ndim)
32374  *
32375  */
32376  }
32377 
32378  /* "View.MemoryView":1307
32379  * order = get_best_order(&dst, ndim)
32380  *
32381  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
32382  * src = tmp
32383  *
32384  */
32385  __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 1307, __pyx_L1_error)
32386  __pyx_v_tmpdata = __pyx_t_7;
32387 
32388  /* "View.MemoryView":1308
32389  *
32390  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
32391  * src = tmp # <<<<<<<<<<<<<<
32392  *
32393  * if not broadcasting:
32394  */
32395  __pyx_v_src = __pyx_v_tmp;
32396 
32397  /* "View.MemoryView":1302
32398  * _err_dim(ValueError, "Dimension %d is not direct", i)
32399  *
32400  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
32401  *
32402  * if not slice_is_contig(src, order, ndim):
32403  */
32404  }
32405 
32406  /* "View.MemoryView":1310
32407  * src = tmp
32408  *
32409  * if not broadcasting: # <<<<<<<<<<<<<<
32410  *
32411  *
32412  */
32413  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
32414  if (__pyx_t_2) {
32415 
32416  /* "View.MemoryView":1313
32417  *
32418  *
32419  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
32420  * direct_copy = slice_is_contig(dst, 'C', ndim)
32421  * elif slice_is_contig(src, 'F', ndim):
32422  */
32423  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
32424  if (__pyx_t_2) {
32425 
32426  /* "View.MemoryView":1314
32427  *
32428  * if slice_is_contig(src, 'C', ndim):
32429  * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
32430  * elif slice_is_contig(src, 'F', ndim):
32431  * direct_copy = slice_is_contig(dst, 'F', ndim)
32432  */
32433  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
32434 
32435  /* "View.MemoryView":1313
32436  *
32437  *
32438  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
32439  * direct_copy = slice_is_contig(dst, 'C', ndim)
32440  * elif slice_is_contig(src, 'F', ndim):
32441  */
32442  goto __pyx_L12;
32443  }
32444 
32445  /* "View.MemoryView":1315
32446  * if slice_is_contig(src, 'C', ndim):
32447  * direct_copy = slice_is_contig(dst, 'C', ndim)
32448  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
32449  * direct_copy = slice_is_contig(dst, 'F', ndim)
32450  *
32451  */
32452  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
32453  if (__pyx_t_2) {
32454 
32455  /* "View.MemoryView":1316
32456  * direct_copy = slice_is_contig(dst, 'C', ndim)
32457  * elif slice_is_contig(src, 'F', ndim):
32458  * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
32459  *
32460  * if direct_copy:
32461  */
32462  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
32463 
32464  /* "View.MemoryView":1315
32465  * if slice_is_contig(src, 'C', ndim):
32466  * direct_copy = slice_is_contig(dst, 'C', ndim)
32467  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
32468  * direct_copy = slice_is_contig(dst, 'F', ndim)
32469  *
32470  */
32471  }
32472  __pyx_L12:;
32473 
32474  /* "View.MemoryView":1318
32475  * direct_copy = slice_is_contig(dst, 'F', ndim)
32476  *
32477  * if direct_copy: # <<<<<<<<<<<<<<
32478  *
32479  * refcount_copying(&dst, dtype_is_object, ndim, False)
32480  */
32481  __pyx_t_2 = (__pyx_v_direct_copy != 0);
32482  if (__pyx_t_2) {
32483 
32484  /* "View.MemoryView":1320
32485  * if direct_copy:
32486  *
32487  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
32488  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
32489  * refcount_copying(&dst, dtype_is_object, ndim, True)
32490  */
32491  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
32492 
32493  /* "View.MemoryView":1321
32494  *
32495  * refcount_copying(&dst, dtype_is_object, ndim, False)
32496  * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
32497  * refcount_copying(&dst, dtype_is_object, ndim, True)
32498  * free(tmpdata)
32499  */
32500  (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
32501 
32502  /* "View.MemoryView":1322
32503  * refcount_copying(&dst, dtype_is_object, ndim, False)
32504  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
32505  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
32506  * free(tmpdata)
32507  * return 0
32508  */
32509  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
32510 
32511  /* "View.MemoryView":1323
32512  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
32513  * refcount_copying(&dst, dtype_is_object, ndim, True)
32514  * free(tmpdata) # <<<<<<<<<<<<<<
32515  * return 0
32516  *
32517  */
32518  free(__pyx_v_tmpdata);
32519 
32520  /* "View.MemoryView":1324
32521  * refcount_copying(&dst, dtype_is_object, ndim, True)
32522  * free(tmpdata)
32523  * return 0 # <<<<<<<<<<<<<<
32524  *
32525  * if order == 'F' == get_best_order(&dst, ndim):
32526  */
32527  __pyx_r = 0;
32528  goto __pyx_L0;
32529 
32530  /* "View.MemoryView":1318
32531  * direct_copy = slice_is_contig(dst, 'F', ndim)
32532  *
32533  * if direct_copy: # <<<<<<<<<<<<<<
32534  *
32535  * refcount_copying(&dst, dtype_is_object, ndim, False)
32536  */
32537  }
32538 
32539  /* "View.MemoryView":1310
32540  * src = tmp
32541  *
32542  * if not broadcasting: # <<<<<<<<<<<<<<
32543  *
32544  *
32545  */
32546  }
32547 
32548  /* "View.MemoryView":1326
32549  * return 0
32550  *
32551  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
32552  *
32553  *
32554  */
32555  __pyx_t_2 = (__pyx_v_order == 'F');
32556  if (__pyx_t_2) {
32557  __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
32558  }
32559  __pyx_t_8 = (__pyx_t_2 != 0);
32560  if (__pyx_t_8) {
32561 
32562  /* "View.MemoryView":1329
32563  *
32564  *
32565  * transpose_memslice(&src) # <<<<<<<<<<<<<<
32566  * transpose_memslice(&dst)
32567  *
32568  */
32569  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1329, __pyx_L1_error)
32570 
32571  /* "View.MemoryView":1330
32572  *
32573  * transpose_memslice(&src)
32574  * transpose_memslice(&dst) # <<<<<<<<<<<<<<
32575  *
32576  * refcount_copying(&dst, dtype_is_object, ndim, False)
32577  */
32578  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1330, __pyx_L1_error)
32579 
32580  /* "View.MemoryView":1326
32581  * return 0
32582  *
32583  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
32584  *
32585  *
32586  */
32587  }
32588 
32589  /* "View.MemoryView":1332
32590  * transpose_memslice(&dst)
32591  *
32592  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
32593  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
32594  * refcount_copying(&dst, dtype_is_object, ndim, True)
32595  */
32596  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
32597 
32598  /* "View.MemoryView":1333
32599  *
32600  * refcount_copying(&dst, dtype_is_object, ndim, False)
32601  * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
32602  * refcount_copying(&dst, dtype_is_object, ndim, True)
32603  *
32604  */
32605  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
32606 
32607  /* "View.MemoryView":1334
32608  * refcount_copying(&dst, dtype_is_object, ndim, False)
32609  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
32610  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
32611  *
32612  * free(tmpdata)
32613  */
32614  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
32615 
32616  /* "View.MemoryView":1336
32617  * refcount_copying(&dst, dtype_is_object, ndim, True)
32618  *
32619  * free(tmpdata) # <<<<<<<<<<<<<<
32620  * return 0
32621  *
32622  */
32623  free(__pyx_v_tmpdata);
32624 
32625  /* "View.MemoryView":1337
32626  *
32627  * free(tmpdata)
32628  * return 0 # <<<<<<<<<<<<<<
32629  *
32630  * @cname('__pyx_memoryview_broadcast_leading')
32631  */
32632  __pyx_r = 0;
32633  goto __pyx_L0;
32634 
32635  /* "View.MemoryView":1268
32636  *
32637  * @cname('__pyx_memoryview_copy_contents')
32638  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
32639  * __Pyx_memviewslice dst,
32640  * int src_ndim, int dst_ndim,
32641  */
32642 
32643  /* function exit code */
32644  __pyx_L1_error:;
32645  {
32646  #ifdef WITH_THREAD
32647  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
32648  #endif
32649  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
32650  #ifdef WITH_THREAD
32651  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32652  #endif
32653  }
32654  __pyx_r = -1;
32655  __pyx_L0:;
32656  return __pyx_r;
32657 }
32658 
32659 /* "View.MemoryView":1340
32660  *
32661  * @cname('__pyx_memoryview_broadcast_leading')
32662  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
32663  * int ndim,
32664  * int ndim_other) nogil:
32665  */
32666 
32667 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
32668  int __pyx_v_i;
32669  int __pyx_v_offset;
32670  int __pyx_t_1;
32671  int __pyx_t_2;
32672  int __pyx_t_3;
32673 
32674  /* "View.MemoryView":1344
32675  * int ndim_other) nogil:
32676  * cdef int i
32677  * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
32678  *
32679  * for i in range(ndim - 1, -1, -1):
32680  */
32681  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
32682 
32683  /* "View.MemoryView":1346
32684  * cdef int offset = ndim_other - ndim
32685  *
32686  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
32687  * mslice.shape[i + offset] = mslice.shape[i]
32688  * mslice.strides[i + offset] = mslice.strides[i]
32689  */
32690  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
32691  __pyx_v_i = __pyx_t_1;
32692 
32693  /* "View.MemoryView":1347
32694  *
32695  * for i in range(ndim - 1, -1, -1):
32696  * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
32697  * mslice.strides[i + offset] = mslice.strides[i]
32698  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32699  */
32700  (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
32701 
32702  /* "View.MemoryView":1348
32703  * for i in range(ndim - 1, -1, -1):
32704  * mslice.shape[i + offset] = mslice.shape[i]
32705  * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
32706  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32707  *
32708  */
32709  (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
32710 
32711  /* "View.MemoryView":1349
32712  * mslice.shape[i + offset] = mslice.shape[i]
32713  * mslice.strides[i + offset] = mslice.strides[i]
32714  * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
32715  *
32716  * for i in range(offset):
32717  */
32718  (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
32719  }
32720 
32721  /* "View.MemoryView":1351
32722  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32723  *
32724  * for i in range(offset): # <<<<<<<<<<<<<<
32725  * mslice.shape[i] = 1
32726  * mslice.strides[i] = mslice.strides[0]
32727  */
32728  __pyx_t_1 = __pyx_v_offset;
32729  __pyx_t_2 = __pyx_t_1;
32730  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
32731  __pyx_v_i = __pyx_t_3;
32732 
32733  /* "View.MemoryView":1352
32734  *
32735  * for i in range(offset):
32736  * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
32737  * mslice.strides[i] = mslice.strides[0]
32738  * mslice.suboffsets[i] = -1
32739  */
32740  (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
32741 
32742  /* "View.MemoryView":1353
32743  * for i in range(offset):
32744  * mslice.shape[i] = 1
32745  * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
32746  * mslice.suboffsets[i] = -1
32747  *
32748  */
32749  (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
32750 
32751  /* "View.MemoryView":1354
32752  * mslice.shape[i] = 1
32753  * mslice.strides[i] = mslice.strides[0]
32754  * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
32755  *
32756  *
32757  */
32758  (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
32759  }
32760 
32761  /* "View.MemoryView":1340
32762  *
32763  * @cname('__pyx_memoryview_broadcast_leading')
32764  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
32765  * int ndim,
32766  * int ndim_other) nogil:
32767  */
32768 
32769  /* function exit code */
32770 }
32771 
32772 /* "View.MemoryView":1362
32773  *
32774  * @cname('__pyx_memoryview_refcount_copying')
32775  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
32776  * int ndim, bint inc) nogil:
32777  *
32778  */
32779 
32780 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
32781  int __pyx_t_1;
32782 
32783  /* "View.MemoryView":1366
32784  *
32785  *
32786  * if dtype_is_object: # <<<<<<<<<<<<<<
32787  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
32788  * dst.strides, ndim, inc)
32789  */
32790  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
32791  if (__pyx_t_1) {
32792 
32793  /* "View.MemoryView":1367
32794  *
32795  * if dtype_is_object:
32796  * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
32797  * dst.strides, ndim, inc)
32798  *
32799  */
32800  __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
32801 
32802  /* "View.MemoryView":1366
32803  *
32804  *
32805  * if dtype_is_object: # <<<<<<<<<<<<<<
32806  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
32807  * dst.strides, ndim, inc)
32808  */
32809  }
32810 
32811  /* "View.MemoryView":1362
32812  *
32813  * @cname('__pyx_memoryview_refcount_copying')
32814  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
32815  * int ndim, bint inc) nogil:
32816  *
32817  */
32818 
32819  /* function exit code */
32820 }
32821 
32822 /* "View.MemoryView":1371
32823  *
32824  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
32825  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32826  * Py_ssize_t *strides, int ndim,
32827  * bint inc) with gil:
32828  */
32829 
32830 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
32831  __Pyx_RefNannyDeclarations
32832  #ifdef WITH_THREAD
32833  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
32834  #endif
32835  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
32836 
32837  /* "View.MemoryView":1374
32838  * Py_ssize_t *strides, int ndim,
32839  * bint inc) with gil:
32840  * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
32841  *
32842  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32843  */
32844  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
32845 
32846  /* "View.MemoryView":1371
32847  *
32848  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
32849  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32850  * Py_ssize_t *strides, int ndim,
32851  * bint inc) with gil:
32852  */
32853 
32854  /* function exit code */
32855  __Pyx_RefNannyFinishContext();
32856  #ifdef WITH_THREAD
32857  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32858  #endif
32859 }
32860 
32861 /* "View.MemoryView":1377
32862  *
32863  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32864  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32865  * Py_ssize_t *strides, int ndim, bint inc):
32866  * cdef Py_ssize_t i
32867  */
32868 
32869 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
32870  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
32871  __Pyx_RefNannyDeclarations
32872  Py_ssize_t __pyx_t_1;
32873  Py_ssize_t __pyx_t_2;
32874  Py_ssize_t __pyx_t_3;
32875  int __pyx_t_4;
32876  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
32877 
32878  /* "View.MemoryView":1381
32879  * cdef Py_ssize_t i
32880  *
32881  * for i in range(shape[0]): # <<<<<<<<<<<<<<
32882  * if ndim == 1:
32883  * if inc:
32884  */
32885  __pyx_t_1 = (__pyx_v_shape[0]);
32886  __pyx_t_2 = __pyx_t_1;
32887  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
32888  __pyx_v_i = __pyx_t_3;
32889 
32890  /* "View.MemoryView":1382
32891  *
32892  * for i in range(shape[0]):
32893  * if ndim == 1: # <<<<<<<<<<<<<<
32894  * if inc:
32895  * Py_INCREF((<PyObject **> data)[0])
32896  */
32897  __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
32898  if (__pyx_t_4) {
32899 
32900  /* "View.MemoryView":1383
32901  * for i in range(shape[0]):
32902  * if ndim == 1:
32903  * if inc: # <<<<<<<<<<<<<<
32904  * Py_INCREF((<PyObject **> data)[0])
32905  * else:
32906  */
32907  __pyx_t_4 = (__pyx_v_inc != 0);
32908  if (__pyx_t_4) {
32909 
32910  /* "View.MemoryView":1384
32911  * if ndim == 1:
32912  * if inc:
32913  * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
32914  * else:
32915  * Py_DECREF((<PyObject **> data)[0])
32916  */
32917  Py_INCREF((((PyObject **)__pyx_v_data)[0]));
32918 
32919  /* "View.MemoryView":1383
32920  * for i in range(shape[0]):
32921  * if ndim == 1:
32922  * if inc: # <<<<<<<<<<<<<<
32923  * Py_INCREF((<PyObject **> data)[0])
32924  * else:
32925  */
32926  goto __pyx_L6;
32927  }
32928 
32929  /* "View.MemoryView":1386
32930  * Py_INCREF((<PyObject **> data)[0])
32931  * else:
32932  * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
32933  * else:
32934  * refcount_objects_in_slice(data, shape + 1, strides + 1,
32935  */
32936  /*else*/ {
32937  Py_DECREF((((PyObject **)__pyx_v_data)[0]));
32938  }
32939  __pyx_L6:;
32940 
32941  /* "View.MemoryView":1382
32942  *
32943  * for i in range(shape[0]):
32944  * if ndim == 1: # <<<<<<<<<<<<<<
32945  * if inc:
32946  * Py_INCREF((<PyObject **> data)[0])
32947  */
32948  goto __pyx_L5;
32949  }
32950 
32951  /* "View.MemoryView":1388
32952  * Py_DECREF((<PyObject **> data)[0])
32953  * else:
32954  * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
32955  * ndim - 1, inc)
32956  *
32957  */
32958  /*else*/ {
32959 
32960  /* "View.MemoryView":1389
32961  * else:
32962  * refcount_objects_in_slice(data, shape + 1, strides + 1,
32963  * ndim - 1, inc) # <<<<<<<<<<<<<<
32964  *
32965  * data += strides[0]
32966  */
32967  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
32968  }
32969  __pyx_L5:;
32970 
32971  /* "View.MemoryView":1391
32972  * ndim - 1, inc)
32973  *
32974  * data += strides[0] # <<<<<<<<<<<<<<
32975  *
32976  *
32977  */
32978  __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
32979  }
32980 
32981  /* "View.MemoryView":1377
32982  *
32983  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32984  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32985  * Py_ssize_t *strides, int ndim, bint inc):
32986  * cdef Py_ssize_t i
32987  */
32988 
32989  /* function exit code */
32990  __Pyx_RefNannyFinishContext();
32991 }
32992 
32993 /* "View.MemoryView":1397
32994  *
32995  * @cname('__pyx_memoryview_slice_assign_scalar')
32996  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
32997  * size_t itemsize, void *item,
32998  * bint dtype_is_object) nogil:
32999  */
33000 
33001 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
33002 
33003  /* "View.MemoryView":1400
33004  * size_t itemsize, void *item,
33005  * bint dtype_is_object) nogil:
33006  * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
33007  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
33008  * itemsize, item)
33009  */
33010  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
33011 
33012  /* "View.MemoryView":1401
33013  * bint dtype_is_object) nogil:
33014  * refcount_copying(dst, dtype_is_object, ndim, False)
33015  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
33016  * itemsize, item)
33017  * refcount_copying(dst, dtype_is_object, ndim, True)
33018  */
33019  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
33020 
33021  /* "View.MemoryView":1403
33022  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
33023  * itemsize, item)
33024  * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
33025  *
33026  *
33027  */
33028  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
33029 
33030  /* "View.MemoryView":1397
33031  *
33032  * @cname('__pyx_memoryview_slice_assign_scalar')
33033  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
33034  * size_t itemsize, void *item,
33035  * bint dtype_is_object) nogil:
33036  */
33037 
33038  /* function exit code */
33039 }
33040 
33041 /* "View.MemoryView":1407
33042  *
33043  * @cname('__pyx_memoryview__slice_assign_scalar')
33044  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
33045  * Py_ssize_t *strides, int ndim,
33046  * size_t itemsize, void *item) nogil:
33047  */
33048 
33049 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
33050  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
33051  Py_ssize_t __pyx_v_stride;
33052  Py_ssize_t __pyx_v_extent;
33053  int __pyx_t_1;
33054  Py_ssize_t __pyx_t_2;
33055  Py_ssize_t __pyx_t_3;
33056  Py_ssize_t __pyx_t_4;
33057 
33058  /* "View.MemoryView":1411
33059  * size_t itemsize, void *item) nogil:
33060  * cdef Py_ssize_t i
33061  * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
33062  * cdef Py_ssize_t extent = shape[0]
33063  *
33064  */
33065  __pyx_v_stride = (__pyx_v_strides[0]);
33066 
33067  /* "View.MemoryView":1412
33068  * cdef Py_ssize_t i
33069  * cdef Py_ssize_t stride = strides[0]
33070  * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
33071  *
33072  * if ndim == 1:
33073  */
33074  __pyx_v_extent = (__pyx_v_shape[0]);
33075 
33076  /* "View.MemoryView":1414
33077  * cdef Py_ssize_t extent = shape[0]
33078  *
33079  * if ndim == 1: # <<<<<<<<<<<<<<
33080  * for i in range(extent):
33081  * memcpy(data, item, itemsize)
33082  */
33083  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
33084  if (__pyx_t_1) {
33085 
33086  /* "View.MemoryView":1415
33087  *
33088  * if ndim == 1:
33089  * for i in range(extent): # <<<<<<<<<<<<<<
33090  * memcpy(data, item, itemsize)
33091  * data += stride
33092  */
33093  __pyx_t_2 = __pyx_v_extent;
33094  __pyx_t_3 = __pyx_t_2;
33095  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
33096  __pyx_v_i = __pyx_t_4;
33097 
33098  /* "View.MemoryView":1416
33099  * if ndim == 1:
33100  * for i in range(extent):
33101  * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
33102  * data += stride
33103  * else:
33104  */
33105  (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
33106 
33107  /* "View.MemoryView":1417
33108  * for i in range(extent):
33109  * memcpy(data, item, itemsize)
33110  * data += stride # <<<<<<<<<<<<<<
33111  * else:
33112  * for i in range(extent):
33113  */
33114  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
33115  }
33116 
33117  /* "View.MemoryView":1414
33118  * cdef Py_ssize_t extent = shape[0]
33119  *
33120  * if ndim == 1: # <<<<<<<<<<<<<<
33121  * for i in range(extent):
33122  * memcpy(data, item, itemsize)
33123  */
33124  goto __pyx_L3;
33125  }
33126 
33127  /* "View.MemoryView":1419
33128  * data += stride
33129  * else:
33130  * for i in range(extent): # <<<<<<<<<<<<<<
33131  * _slice_assign_scalar(data, shape + 1, strides + 1,
33132  * ndim - 1, itemsize, item)
33133  */
33134  /*else*/ {
33135  __pyx_t_2 = __pyx_v_extent;
33136  __pyx_t_3 = __pyx_t_2;
33137  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
33138  __pyx_v_i = __pyx_t_4;
33139 
33140  /* "View.MemoryView":1420
33141  * else:
33142  * for i in range(extent):
33143  * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
33144  * ndim - 1, itemsize, item)
33145  * data += stride
33146  */
33147  __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
33148 
33149  /* "View.MemoryView":1422
33150  * _slice_assign_scalar(data, shape + 1, strides + 1,
33151  * ndim - 1, itemsize, item)
33152  * data += stride # <<<<<<<<<<<<<<
33153  *
33154  *
33155  */
33156  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
33157  }
33158  }
33159  __pyx_L3:;
33160 
33161  /* "View.MemoryView":1407
33162  *
33163  * @cname('__pyx_memoryview__slice_assign_scalar')
33164  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
33165  * Py_ssize_t *strides, int ndim,
33166  * size_t itemsize, void *item) nogil:
33167  */
33168 
33169  /* function exit code */
33170 }
33171 
33172 /* "(tree fragment)":1
33173  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
33174  * cdef object __pyx_PickleError
33175  * cdef object __pyx_result
33176  */
33177 
33178 /* Python wrapper */
33179 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33180 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
33181 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33182  PyObject *__pyx_v___pyx_type = 0;
33183  long __pyx_v___pyx_checksum;
33184  PyObject *__pyx_v___pyx_state = 0;
33185  PyObject *__pyx_r = 0;
33186  __Pyx_RefNannyDeclarations
33187  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
33188  {
33189  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
33190  PyObject* values[3] = {0,0,0};
33191  if (unlikely(__pyx_kwds)) {
33192  Py_ssize_t kw_args;
33193  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33194  switch (pos_args) {
33195  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33196  CYTHON_FALLTHROUGH;
33197  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33198  CYTHON_FALLTHROUGH;
33199  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33200  CYTHON_FALLTHROUGH;
33201  case 0: break;
33202  default: goto __pyx_L5_argtuple_error;
33203  }
33204  kw_args = PyDict_Size(__pyx_kwds);
33205  switch (pos_args) {
33206  case 0:
33207  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
33208  else goto __pyx_L5_argtuple_error;
33209  CYTHON_FALLTHROUGH;
33210  case 1:
33211  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
33212  else {
33213  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(0, 1, __pyx_L3_error)
33214  }
33215  CYTHON_FALLTHROUGH;
33216  case 2:
33217  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
33218  else {
33219  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(0, 1, __pyx_L3_error)
33220  }
33221  }
33222  if (unlikely(kw_args > 0)) {
33223  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(0, 1, __pyx_L3_error)
33224  }
33225  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
33226  goto __pyx_L5_argtuple_error;
33227  } else {
33228  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33229  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33230  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33231  }
33232  __pyx_v___pyx_type = values[0];
33233  __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error)
33234  __pyx_v___pyx_state = values[2];
33235  }
33236  goto __pyx_L4_argument_unpacking_done;
33237  __pyx_L5_argtuple_error:;
33238  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1, __pyx_L3_error)
33239  __pyx_L3_error:;
33240  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
33241  __Pyx_RefNannyFinishContext();
33242  return NULL;
33243  __pyx_L4_argument_unpacking_done:;
33244  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
33245 
33246  /* function exit code */
33247  __Pyx_RefNannyFinishContext();
33248  return __pyx_r;
33249 }
33250 
33251 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
33252  PyObject *__pyx_v___pyx_PickleError = 0;
33253  PyObject *__pyx_v___pyx_result = 0;
33254  PyObject *__pyx_r = NULL;
33255  __Pyx_RefNannyDeclarations
33256  int __pyx_t_1;
33257  PyObject *__pyx_t_2 = NULL;
33258  PyObject *__pyx_t_3 = NULL;
33259  PyObject *__pyx_t_4 = NULL;
33260  PyObject *__pyx_t_5 = NULL;
33261  int __pyx_t_6;
33262  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
33263 
33264  /* "(tree fragment)":4
33265  * cdef object __pyx_PickleError
33266  * cdef object __pyx_result
33267  * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<<
33268  * from pickle import PickleError as __pyx_PickleError
33269  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33270  */
33271  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
33272  if (__pyx_t_1) {
33273 
33274  /* "(tree fragment)":5
33275  * cdef object __pyx_result
33276  * if __pyx_checksum != 0xb068931:
33277  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
33278  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33279  * __pyx_result = Enum.__new__(__pyx_type)
33280  */
33281  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
33282  __Pyx_GOTREF(__pyx_t_2);
33283  __Pyx_INCREF(__pyx_n_s_PickleError);
33284  __Pyx_GIVEREF(__pyx_n_s_PickleError);
33285  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
33286  __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
33287  __Pyx_GOTREF(__pyx_t_3);
33288  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33289  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
33290  __Pyx_GOTREF(__pyx_t_2);
33291  __Pyx_INCREF(__pyx_t_2);
33292  __pyx_v___pyx_PickleError = __pyx_t_2;
33293  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33294  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33295 
33296  /* "(tree fragment)":6
33297  * if __pyx_checksum != 0xb068931:
33298  * from pickle import PickleError as __pyx_PickleError
33299  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
33300  * __pyx_result = Enum.__new__(__pyx_type)
33301  * if __pyx_state is not None:
33302  */
33303  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
33304  __Pyx_GOTREF(__pyx_t_2);
33305  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
33306  __Pyx_GOTREF(__pyx_t_4);
33307  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33308  __Pyx_INCREF(__pyx_v___pyx_PickleError);
33309  __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
33310  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
33311  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
33312  if (likely(__pyx_t_5)) {
33313  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
33314  __Pyx_INCREF(__pyx_t_5);
33315  __Pyx_INCREF(function);
33316  __Pyx_DECREF_SET(__pyx_t_2, function);
33317  }
33318  }
33319  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
33320  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
33321  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33322  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
33323  __Pyx_GOTREF(__pyx_t_3);
33324  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33325  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
33326  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33327  __PYX_ERR(0, 6, __pyx_L1_error)
33328 
33329  /* "(tree fragment)":4
33330  * cdef object __pyx_PickleError
33331  * cdef object __pyx_result
33332  * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<<
33333  * from pickle import PickleError as __pyx_PickleError
33334  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33335  */
33336  }
33337 
33338  /* "(tree fragment)":7
33339  * from pickle import PickleError as __pyx_PickleError
33340  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33341  * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
33342  * if __pyx_state is not None:
33343  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33344  */
33345  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
33346  __Pyx_GOTREF(__pyx_t_2);
33347  __pyx_t_4 = NULL;
33348  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
33349  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
33350  if (likely(__pyx_t_4)) {
33351  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
33352  __Pyx_INCREF(__pyx_t_4);
33353  __Pyx_INCREF(function);
33354  __Pyx_DECREF_SET(__pyx_t_2, function);
33355  }
33356  }
33357  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
33358  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
33359  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
33360  __Pyx_GOTREF(__pyx_t_3);
33361  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33362  __pyx_v___pyx_result = __pyx_t_3;
33363  __pyx_t_3 = 0;
33364 
33365  /* "(tree fragment)":8
33366  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33367  * __pyx_result = Enum.__new__(__pyx_type)
33368  * if __pyx_state is not None: # <<<<<<<<<<<<<<
33369  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33370  * return __pyx_result
33371  */
33372  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
33373  __pyx_t_6 = (__pyx_t_1 != 0);
33374  if (__pyx_t_6) {
33375 
33376  /* "(tree fragment)":9
33377  * __pyx_result = Enum.__new__(__pyx_type)
33378  * if __pyx_state is not None:
33379  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
33380  * return __pyx_result
33381  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33382  */
33383  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 9, __pyx_L1_error)
33384  __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error)
33385  __Pyx_GOTREF(__pyx_t_3);
33386  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33387 
33388  /* "(tree fragment)":8
33389  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33390  * __pyx_result = Enum.__new__(__pyx_type)
33391  * if __pyx_state is not None: # <<<<<<<<<<<<<<
33392  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33393  * return __pyx_result
33394  */
33395  }
33396 
33397  /* "(tree fragment)":10
33398  * if __pyx_state is not None:
33399  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33400  * return __pyx_result # <<<<<<<<<<<<<<
33401  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33402  * __pyx_result.name = __pyx_state[0]
33403  */
33404  __Pyx_XDECREF(__pyx_r);
33405  __Pyx_INCREF(__pyx_v___pyx_result);
33406  __pyx_r = __pyx_v___pyx_result;
33407  goto __pyx_L0;
33408 
33409  /* "(tree fragment)":1
33410  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
33411  * cdef object __pyx_PickleError
33412  * cdef object __pyx_result
33413  */
33414 
33415  /* function exit code */
33416  __pyx_L1_error:;
33417  __Pyx_XDECREF(__pyx_t_2);
33418  __Pyx_XDECREF(__pyx_t_3);
33419  __Pyx_XDECREF(__pyx_t_4);
33420  __Pyx_XDECREF(__pyx_t_5);
33421  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
33422  __pyx_r = NULL;
33423  __pyx_L0:;
33424  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
33425  __Pyx_XDECREF(__pyx_v___pyx_result);
33426  __Pyx_XGIVEREF(__pyx_r);
33427  __Pyx_RefNannyFinishContext();
33428  return __pyx_r;
33429 }
33430 
33431 /* "(tree fragment)":11
33432  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33433  * return __pyx_result
33434  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
33435  * __pyx_result.name = __pyx_state[0]
33436  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33437  */
33438 
33439 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
33440  PyObject *__pyx_r = NULL;
33441  __Pyx_RefNannyDeclarations
33442  PyObject *__pyx_t_1 = NULL;
33443  int __pyx_t_2;
33444  Py_ssize_t __pyx_t_3;
33445  int __pyx_t_4;
33446  int __pyx_t_5;
33447  PyObject *__pyx_t_6 = NULL;
33448  PyObject *__pyx_t_7 = NULL;
33449  PyObject *__pyx_t_8 = NULL;
33450  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
33451 
33452  /* "(tree fragment)":12
33453  * return __pyx_result
33454  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33455  * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
33456  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33457  * __pyx_result.__dict__.update(__pyx_state[1])
33458  */
33459  if (unlikely(__pyx_v___pyx_state == Py_None)) {
33460  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
33461  __PYX_ERR(0, 12, __pyx_L1_error)
33462  }
33463  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
33464  __Pyx_GOTREF(__pyx_t_1);
33465  __Pyx_GIVEREF(__pyx_t_1);
33466  __Pyx_GOTREF(__pyx_v___pyx_result->name);
33467  __Pyx_DECREF(__pyx_v___pyx_result->name);
33468  __pyx_v___pyx_result->name = __pyx_t_1;
33469  __pyx_t_1 = 0;
33470 
33471  /* "(tree fragment)":13
33472  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33473  * __pyx_result.name = __pyx_state[0]
33474  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
33475  * __pyx_result.__dict__.update(__pyx_state[1])
33476  */
33477  if (unlikely(__pyx_v___pyx_state == Py_None)) {
33478  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
33479  __PYX_ERR(0, 13, __pyx_L1_error)
33480  }
33481  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
33482  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
33483  if (__pyx_t_4) {
33484  } else {
33485  __pyx_t_2 = __pyx_t_4;
33486  goto __pyx_L4_bool_binop_done;
33487  }
33488  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
33489  __pyx_t_5 = (__pyx_t_4 != 0);
33490  __pyx_t_2 = __pyx_t_5;
33491  __pyx_L4_bool_binop_done:;
33492  if (__pyx_t_2) {
33493 
33494  /* "(tree fragment)":14
33495  * __pyx_result.name = __pyx_state[0]
33496  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33497  * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
33498  */
33499  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
33500  __Pyx_GOTREF(__pyx_t_6);
33501  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14, __pyx_L1_error)
33502  __Pyx_GOTREF(__pyx_t_7);
33503  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33504  if (unlikely(__pyx_v___pyx_state == Py_None)) {
33505  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
33506  __PYX_ERR(0, 14, __pyx_L1_error)
33507  }
33508  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
33509  __Pyx_GOTREF(__pyx_t_6);
33510  __pyx_t_8 = NULL;
33511  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
33512  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
33513  if (likely(__pyx_t_8)) {
33514  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
33515  __Pyx_INCREF(__pyx_t_8);
33516  __Pyx_INCREF(function);
33517  __Pyx_DECREF_SET(__pyx_t_7, function);
33518  }
33519  }
33520  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
33521  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
33522  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33523  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
33524  __Pyx_GOTREF(__pyx_t_1);
33525  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
33526  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
33527 
33528  /* "(tree fragment)":13
33529  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33530  * __pyx_result.name = __pyx_state[0]
33531  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
33532  * __pyx_result.__dict__.update(__pyx_state[1])
33533  */
33534  }
33535 
33536  /* "(tree fragment)":11
33537  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33538  * return __pyx_result
33539  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
33540  * __pyx_result.name = __pyx_state[0]
33541  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33542  */
33543 
33544  /* function exit code */
33545  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33546  goto __pyx_L0;
33547  __pyx_L1_error:;
33548  __Pyx_XDECREF(__pyx_t_1);
33549  __Pyx_XDECREF(__pyx_t_6);
33550  __Pyx_XDECREF(__pyx_t_7);
33551  __Pyx_XDECREF(__pyx_t_8);
33552  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
33553  __pyx_r = 0;
33554  __pyx_L0:;
33555  __Pyx_XGIVEREF(__pyx_r);
33556  __Pyx_RefNannyFinishContext();
33557  return __pyx_r;
33558 }
33559 
33560 /* "BufferFormatFromTypeInfo":1463
33561  *
33562  * @cname('__pyx_format_from_typeinfo')
33563  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
33564  * cdef __Pyx_StructField *field
33565  * cdef __pyx_typeinfo_string fmt
33566  */
33567 
33568 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) {
33569  __Pyx_StructField *__pyx_v_field;
33570  struct __pyx_typeinfo_string __pyx_v_fmt;
33571  PyObject *__pyx_v_part = 0;
33572  PyObject *__pyx_v_result = 0;
33573  PyObject *__pyx_v_alignment = NULL;
33574  PyObject *__pyx_v_parts = NULL;
33575  PyObject *__pyx_v_extents = NULL;
33576  int __pyx_v_i;
33577  PyObject *__pyx_r = NULL;
33578  __Pyx_RefNannyDeclarations
33579  int __pyx_t_1;
33580  int __pyx_t_2;
33581  PyObject *__pyx_t_3 = NULL;
33582  __Pyx_StructField *__pyx_t_4;
33583  PyObject *__pyx_t_5 = NULL;
33584  PyObject *__pyx_t_6 = NULL;
33585  int __pyx_t_7;
33586  int __pyx_t_8;
33587  int __pyx_t_9;
33588  int __pyx_t_10;
33589  __Pyx_RefNannySetupContext("format_from_typeinfo", 0);
33590 
33591  /* "BufferFormatFromTypeInfo":1468
33592  * cdef bytes part, result
33593  *
33594  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
33595  * assert type.fields != NULL and type.fields.type != NULL
33596  *
33597  */
33598  __pyx_t_1 = ((__pyx_v_type->typegroup == 'S') != 0);
33599  if (__pyx_t_1) {
33600 
33601  /* "BufferFormatFromTypeInfo":1469
33602  *
33603  * if type.typegroup == 'S':
33604  * assert type.fields != NULL and type.fields.type != NULL # <<<<<<<<<<<<<<
33605  *
33606  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
33607  */
33608  #ifndef CYTHON_WITHOUT_ASSERTIONS
33609  if (unlikely(!Py_OptimizeFlag)) {
33610  __pyx_t_2 = ((__pyx_v_type->fields != NULL) != 0);
33611  if (__pyx_t_2) {
33612  } else {
33613  __pyx_t_1 = __pyx_t_2;
33614  goto __pyx_L4_bool_binop_done;
33615  }
33616  __pyx_t_2 = ((__pyx_v_type->fields->type != NULL) != 0);
33617  __pyx_t_1 = __pyx_t_2;
33618  __pyx_L4_bool_binop_done:;
33619  if (unlikely(!__pyx_t_1)) {
33620  PyErr_SetNone(PyExc_AssertionError);
33621  __PYX_ERR(0, 1469, __pyx_L1_error)
33622  }
33623  }
33624  #endif
33625 
33626  /* "BufferFormatFromTypeInfo":1471
33627  * assert type.fields != NULL and type.fields.type != NULL
33628  *
33629  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
33630  * alignment = b'^'
33631  * else:
33632  */
33633  __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT) != 0);
33634  if (__pyx_t_1) {
33635 
33636  /* "BufferFormatFromTypeInfo":1472
33637  *
33638  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
33639  * alignment = b'^' # <<<<<<<<<<<<<<
33640  * else:
33641  * alignment = b''
33642  */
33643  __Pyx_INCREF(__pyx_kp_b__31);
33644  __pyx_v_alignment = __pyx_kp_b__31;
33645 
33646  /* "BufferFormatFromTypeInfo":1471
33647  * assert type.fields != NULL and type.fields.type != NULL
33648  *
33649  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
33650  * alignment = b'^'
33651  * else:
33652  */
33653  goto __pyx_L6;
33654  }
33655 
33656  /* "BufferFormatFromTypeInfo":1474
33657  * alignment = b'^'
33658  * else:
33659  * alignment = b'' # <<<<<<<<<<<<<<
33660  *
33661  * parts = [b"T{"]
33662  */
33663  /*else*/ {
33664  __Pyx_INCREF(__pyx_kp_b__32);
33665  __pyx_v_alignment = __pyx_kp_b__32;
33666  }
33667  __pyx_L6:;
33668 
33669  /* "BufferFormatFromTypeInfo":1476
33670  * alignment = b''
33671  *
33672  * parts = [b"T{"] # <<<<<<<<<<<<<<
33673  * field = type.fields
33674  *
33675  */
33676  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
33677  __Pyx_GOTREF(__pyx_t_3);
33678  __Pyx_INCREF(__pyx_kp_b_T);
33679  __Pyx_GIVEREF(__pyx_kp_b_T);
33680  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_b_T);
33681  __pyx_v_parts = ((PyObject*)__pyx_t_3);
33682  __pyx_t_3 = 0;
33683 
33684  /* "BufferFormatFromTypeInfo":1477
33685  *
33686  * parts = [b"T{"]
33687  * field = type.fields # <<<<<<<<<<<<<<
33688  *
33689  * while field.type:
33690  */
33691  __pyx_t_4 = __pyx_v_type->fields;
33692  __pyx_v_field = __pyx_t_4;
33693 
33694  /* "BufferFormatFromTypeInfo":1479
33695  * field = type.fields
33696  *
33697  * while field.type: # <<<<<<<<<<<<<<
33698  * part = format_from_typeinfo(field.type)
33699  * parts.append(part + b':' + field.name + b':')
33700  */
33701  while (1) {
33702  __pyx_t_1 = (__pyx_v_field->type != 0);
33703  if (!__pyx_t_1) break;
33704 
33705  /* "BufferFormatFromTypeInfo":1480
33706  *
33707  * while field.type:
33708  * part = format_from_typeinfo(field.type) # <<<<<<<<<<<<<<
33709  * parts.append(part + b':' + field.name + b':')
33710  * field += 1
33711  */
33712  __pyx_t_3 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error)
33713  __Pyx_GOTREF(__pyx_t_3);
33714  __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_3));
33715  __pyx_t_3 = 0;
33716 
33717  /* "BufferFormatFromTypeInfo":1481
33718  * while field.type:
33719  * part = format_from_typeinfo(field.type)
33720  * parts.append(part + b':' + field.name + b':') # <<<<<<<<<<<<<<
33721  * field += 1
33722  *
33723  */
33724  __pyx_t_3 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__33); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error)
33725  __Pyx_GOTREF(__pyx_t_3);
33726  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1481, __pyx_L1_error)
33727  __Pyx_GOTREF(__pyx_t_5);
33728  __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1481, __pyx_L1_error)
33729  __Pyx_GOTREF(__pyx_t_6);
33730  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33731  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33732  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__33); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1481, __pyx_L1_error)
33733  __Pyx_GOTREF(__pyx_t_5);
33734  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33735  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1481, __pyx_L1_error)
33736  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33737 
33738  /* "BufferFormatFromTypeInfo":1482
33739  * part = format_from_typeinfo(field.type)
33740  * parts.append(part + b':' + field.name + b':')
33741  * field += 1 # <<<<<<<<<<<<<<
33742  *
33743  * result = alignment.join(parts) + b'}'
33744  */
33745  __pyx_v_field = (__pyx_v_field + 1);
33746  }
33747 
33748  /* "BufferFormatFromTypeInfo":1484
33749  * field += 1
33750  *
33751  * result = alignment.join(parts) + b'}' # <<<<<<<<<<<<<<
33752  * else:
33753  * fmt = __Pyx_TypeInfoToFormat(type)
33754  */
33755  __pyx_t_5 = __Pyx_PyBytes_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1484, __pyx_L1_error)
33756  __Pyx_GOTREF(__pyx_t_5);
33757  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__34); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1484, __pyx_L1_error)
33758  __Pyx_GOTREF(__pyx_t_6);
33759  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33760  if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1484, __pyx_L1_error)
33761  __pyx_v_result = ((PyObject*)__pyx_t_6);
33762  __pyx_t_6 = 0;
33763 
33764  /* "BufferFormatFromTypeInfo":1468
33765  * cdef bytes part, result
33766  *
33767  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
33768  * assert type.fields != NULL and type.fields.type != NULL
33769  *
33770  */
33771  goto __pyx_L3;
33772  }
33773 
33774  /* "BufferFormatFromTypeInfo":1486
33775  * result = alignment.join(parts) + b'}'
33776  * else:
33777  * fmt = __Pyx_TypeInfoToFormat(type) # <<<<<<<<<<<<<<
33778  * if type.arraysize[0]:
33779  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33780  */
33781  /*else*/ {
33782  __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type);
33783 
33784  /* "BufferFormatFromTypeInfo":1487
33785  * else:
33786  * fmt = __Pyx_TypeInfoToFormat(type)
33787  * if type.arraysize[0]: # <<<<<<<<<<<<<<
33788  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33789  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33790  */
33791  __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0);
33792  if (__pyx_t_1) {
33793 
33794  /* "BufferFormatFromTypeInfo":1488
33795  * fmt = __Pyx_TypeInfoToFormat(type)
33796  * if type.arraysize[0]:
33797  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] # <<<<<<<<<<<<<<
33798  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33799  * else:
33800  */
33801  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1488, __pyx_L1_error)
33802  __Pyx_GOTREF(__pyx_t_6);
33803  __pyx_t_8 = __pyx_v_type->ndim;
33804  __pyx_t_9 = __pyx_t_8;
33805  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
33806  __pyx_v_i = __pyx_t_10;
33807  __pyx_t_5 = __Pyx_PyInt_FromSize_t((__pyx_v_type->arraysize[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __pyx_L1_error)
33808  __Pyx_GOTREF(__pyx_t_5);
33809  __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1488, __pyx_L1_error)
33810  __Pyx_GOTREF(__pyx_t_3);
33811  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33812  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1488, __pyx_L1_error)
33813  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33814  }
33815  __pyx_v_extents = ((PyObject*)__pyx_t_6);
33816  __pyx_t_6 = 0;
33817 
33818  /* "BufferFormatFromTypeInfo":1489
33819  * if type.arraysize[0]:
33820  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33821  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string # <<<<<<<<<<<<<<
33822  * else:
33823  * result = fmt.string
33824  */
33825  __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__35, __pyx_v_extents); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1489, __pyx_L1_error)
33826  __Pyx_GOTREF(__pyx_t_6);
33827  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error)
33828  __Pyx_GOTREF(__pyx_t_3);
33829  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33830  __pyx_t_6 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1489, __pyx_L1_error)
33831  __Pyx_GOTREF(__pyx_t_6);
33832  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33833  __pyx_t_3 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error)
33834  __Pyx_GOTREF(__pyx_t_3);
33835  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L1_error)
33836  __Pyx_GOTREF(__pyx_t_5);
33837  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33838  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33839  if (!(likely(PyBytes_CheckExact(__pyx_t_5))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1489, __pyx_L1_error)
33840  __pyx_v_result = ((PyObject*)__pyx_t_5);
33841  __pyx_t_5 = 0;
33842 
33843  /* "BufferFormatFromTypeInfo":1487
33844  * else:
33845  * fmt = __Pyx_TypeInfoToFormat(type)
33846  * if type.arraysize[0]: # <<<<<<<<<<<<<<
33847  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33848  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33849  */
33850  goto __pyx_L9;
33851  }
33852 
33853  /* "BufferFormatFromTypeInfo":1491
33854  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33855  * else:
33856  * result = fmt.string # <<<<<<<<<<<<<<
33857  *
33858  * return result
33859  */
33860  /*else*/ {
33861  __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1491, __pyx_L1_error)
33862  __Pyx_GOTREF(__pyx_t_5);
33863  __pyx_v_result = ((PyObject*)__pyx_t_5);
33864  __pyx_t_5 = 0;
33865  }
33866  __pyx_L9:;
33867  }
33868  __pyx_L3:;
33869 
33870  /* "BufferFormatFromTypeInfo":1493
33871  * result = fmt.string
33872  *
33873  * return result # <<<<<<<<<<<<<<
33874  */
33875  __Pyx_XDECREF(__pyx_r);
33876  __Pyx_INCREF(__pyx_v_result);
33877  __pyx_r = __pyx_v_result;
33878  goto __pyx_L0;
33879 
33880  /* "BufferFormatFromTypeInfo":1463
33881  *
33882  * @cname('__pyx_format_from_typeinfo')
33883  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
33884  * cdef __Pyx_StructField *field
33885  * cdef __pyx_typeinfo_string fmt
33886  */
33887 
33888  /* function exit code */
33889  __pyx_L1_error:;
33890  __Pyx_XDECREF(__pyx_t_3);
33891  __Pyx_XDECREF(__pyx_t_5);
33892  __Pyx_XDECREF(__pyx_t_6);
33893  __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
33894  __pyx_r = 0;
33895  __pyx_L0:;
33896  __Pyx_XDECREF(__pyx_v_part);
33897  __Pyx_XDECREF(__pyx_v_result);
33898  __Pyx_XDECREF(__pyx_v_alignment);
33899  __Pyx_XDECREF(__pyx_v_parts);
33900  __Pyx_XDECREF(__pyx_v_extents);
33901  __Pyx_XGIVEREF(__pyx_r);
33902  __Pyx_RefNannyFinishContext();
33903  return __pyx_r;
33904 }
33905 
33906 static PyObject *__pyx_tp_new_10cmeshTools_CMesh(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
33907  struct __pyx_obj_10cmeshTools_CMesh *p;
33908  PyObject *o;
33909  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
33910  o = (*t->tp_alloc)(t, 0);
33911  } else {
33912  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
33913  }
33914  if (unlikely(!o)) return 0;
33915  p = ((struct __pyx_obj_10cmeshTools_CMesh *)o);
33916  p->elementNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33917  p->nodeElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33918  p->nodeElementOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33919  p->elementNeighborsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33920  p->elementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33921  p->elementBoundaryNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33922  p->elementBoundaryElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33923  p->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33924  p->interiorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33925  p->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33926  p->edgeNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33927  p->nodeStarArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33928  p->nodeStarOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33929  p->elementMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33930  p->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33931  p->nodeMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33932  p->nodeArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33933  p->elementIJK = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33934  p->weights = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33935  p->U_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33936  p->V_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33937  p->W_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33938  p->elementDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33939  p->elementInnerDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33940  p->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33941  p->elementBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33942  p->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33943  p->nodeDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33944  p->nodeSupportArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33945  return o;
33946 }
33947 
33948 static void __pyx_tp_dealloc_10cmeshTools_CMesh(PyObject *o) {
33949  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
33950  #if CYTHON_USE_TP_FINALIZE
33951  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
33952  if (PyObject_CallFinalizerFromDealloc(o)) return;
33953  }
33954  #endif
33955  PyObject_GC_UnTrack(o);
33956  Py_CLEAR(p->elementNodesArray);
33957  Py_CLEAR(p->nodeElementsArray);
33958  Py_CLEAR(p->nodeElementOffsets);
33959  Py_CLEAR(p->elementNeighborsArray);
33960  Py_CLEAR(p->elementBoundariesArray);
33961  Py_CLEAR(p->elementBoundaryNodesArray);
33962  Py_CLEAR(p->elementBoundaryElementsArray);
33963  Py_CLEAR(p->elementBoundaryLocalElementBoundariesArray);
33964  Py_CLEAR(p->interiorElementBoundariesArray);
33965  Py_CLEAR(p->exteriorElementBoundariesArray);
33966  Py_CLEAR(p->edgeNodesArray);
33967  Py_CLEAR(p->nodeStarArray);
33968  Py_CLEAR(p->nodeStarOffsets);
33969  Py_CLEAR(p->elementMaterialTypes);
33970  Py_CLEAR(p->elementBoundaryMaterialTypes);
33971  Py_CLEAR(p->nodeMaterialTypes);
33972  Py_CLEAR(p->nodeArray);
33973  Py_CLEAR(p->elementIJK);
33974  Py_CLEAR(p->weights);
33975  Py_CLEAR(p->U_KNOT);
33976  Py_CLEAR(p->V_KNOT);
33977  Py_CLEAR(p->W_KNOT);
33978  Py_CLEAR(p->elementDiametersArray);
33979  Py_CLEAR(p->elementInnerDiametersArray);
33980  Py_CLEAR(p->elementBoundaryDiametersArray);
33981  Py_CLEAR(p->elementBarycentersArray);
33982  Py_CLEAR(p->elementBoundaryBarycentersArray);
33983  Py_CLEAR(p->nodeDiametersArray);
33984  Py_CLEAR(p->nodeSupportArray);
33985  (*Py_TYPE(o)->tp_free)(o);
33986 }
33987 
33988 static int __pyx_tp_traverse_10cmeshTools_CMesh(PyObject *o, visitproc v, void *a) {
33989  int e;
33990  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
33991  if (p->elementNodesArray) {
33992  e = (*v)(((PyObject *)p->elementNodesArray), a); if (e) return e;
33993  }
33994  if (p->nodeElementsArray) {
33995  e = (*v)(((PyObject *)p->nodeElementsArray), a); if (e) return e;
33996  }
33997  if (p->nodeElementOffsets) {
33998  e = (*v)(((PyObject *)p->nodeElementOffsets), a); if (e) return e;
33999  }
34000  if (p->elementNeighborsArray) {
34001  e = (*v)(((PyObject *)p->elementNeighborsArray), a); if (e) return e;
34002  }
34003  if (p->elementBoundariesArray) {
34004  e = (*v)(((PyObject *)p->elementBoundariesArray), a); if (e) return e;
34005  }
34006  if (p->elementBoundaryNodesArray) {
34007  e = (*v)(((PyObject *)p->elementBoundaryNodesArray), a); if (e) return e;
34008  }
34009  if (p->elementBoundaryElementsArray) {
34010  e = (*v)(((PyObject *)p->elementBoundaryElementsArray), a); if (e) return e;
34011  }
34012  if (p->elementBoundaryLocalElementBoundariesArray) {
34013  e = (*v)(((PyObject *)p->elementBoundaryLocalElementBoundariesArray), a); if (e) return e;
34014  }
34015  if (p->interiorElementBoundariesArray) {
34016  e = (*v)(((PyObject *)p->interiorElementBoundariesArray), a); if (e) return e;
34017  }
34018  if (p->exteriorElementBoundariesArray) {
34019  e = (*v)(((PyObject *)p->exteriorElementBoundariesArray), a); if (e) return e;
34020  }
34021  if (p->edgeNodesArray) {
34022  e = (*v)(((PyObject *)p->edgeNodesArray), a); if (e) return e;
34023  }
34024  if (p->nodeStarArray) {
34025  e = (*v)(((PyObject *)p->nodeStarArray), a); if (e) return e;
34026  }
34027  if (p->nodeStarOffsets) {
34028  e = (*v)(((PyObject *)p->nodeStarOffsets), a); if (e) return e;
34029  }
34030  if (p->elementMaterialTypes) {
34031  e = (*v)(((PyObject *)p->elementMaterialTypes), a); if (e) return e;
34032  }
34033  if (p->elementBoundaryMaterialTypes) {
34034  e = (*v)(((PyObject *)p->elementBoundaryMaterialTypes), a); if (e) return e;
34035  }
34036  if (p->nodeMaterialTypes) {
34037  e = (*v)(((PyObject *)p->nodeMaterialTypes), a); if (e) return e;
34038  }
34039  if (p->nodeArray) {
34040  e = (*v)(((PyObject *)p->nodeArray), a); if (e) return e;
34041  }
34042  if (p->elementIJK) {
34043  e = (*v)(((PyObject *)p->elementIJK), a); if (e) return e;
34044  }
34045  if (p->weights) {
34046  e = (*v)(((PyObject *)p->weights), a); if (e) return e;
34047  }
34048  if (p->U_KNOT) {
34049  e = (*v)(((PyObject *)p->U_KNOT), a); if (e) return e;
34050  }
34051  if (p->V_KNOT) {
34052  e = (*v)(((PyObject *)p->V_KNOT), a); if (e) return e;
34053  }
34054  if (p->W_KNOT) {
34055  e = (*v)(((PyObject *)p->W_KNOT), a); if (e) return e;
34056  }
34057  if (p->elementDiametersArray) {
34058  e = (*v)(((PyObject *)p->elementDiametersArray), a); if (e) return e;
34059  }
34060  if (p->elementInnerDiametersArray) {
34061  e = (*v)(((PyObject *)p->elementInnerDiametersArray), a); if (e) return e;
34062  }
34063  if (p->elementBoundaryDiametersArray) {
34064  e = (*v)(((PyObject *)p->elementBoundaryDiametersArray), a); if (e) return e;
34065  }
34066  if (p->elementBarycentersArray) {
34067  e = (*v)(((PyObject *)p->elementBarycentersArray), a); if (e) return e;
34068  }
34069  if (p->elementBoundaryBarycentersArray) {
34070  e = (*v)(((PyObject *)p->elementBoundaryBarycentersArray), a); if (e) return e;
34071  }
34072  if (p->nodeDiametersArray) {
34073  e = (*v)(((PyObject *)p->nodeDiametersArray), a); if (e) return e;
34074  }
34075  if (p->nodeSupportArray) {
34076  e = (*v)(((PyObject *)p->nodeSupportArray), a); if (e) return e;
34077  }
34078  return 0;
34079 }
34080 
34081 static int __pyx_tp_clear_10cmeshTools_CMesh(PyObject *o) {
34082  PyObject* tmp;
34083  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
34084  tmp = ((PyObject*)p->elementNodesArray);
34085  p->elementNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34086  Py_XDECREF(tmp);
34087  tmp = ((PyObject*)p->nodeElementsArray);
34088  p->nodeElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34089  Py_XDECREF(tmp);
34090  tmp = ((PyObject*)p->nodeElementOffsets);
34091  p->nodeElementOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34092  Py_XDECREF(tmp);
34093  tmp = ((PyObject*)p->elementNeighborsArray);
34094  p->elementNeighborsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34095  Py_XDECREF(tmp);
34096  tmp = ((PyObject*)p->elementBoundariesArray);
34097  p->elementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34098  Py_XDECREF(tmp);
34099  tmp = ((PyObject*)p->elementBoundaryNodesArray);
34100  p->elementBoundaryNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34101  Py_XDECREF(tmp);
34102  tmp = ((PyObject*)p->elementBoundaryElementsArray);
34103  p->elementBoundaryElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34104  Py_XDECREF(tmp);
34105  tmp = ((PyObject*)p->elementBoundaryLocalElementBoundariesArray);
34106  p->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34107  Py_XDECREF(tmp);
34108  tmp = ((PyObject*)p->interiorElementBoundariesArray);
34109  p->interiorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34110  Py_XDECREF(tmp);
34111  tmp = ((PyObject*)p->exteriorElementBoundariesArray);
34112  p->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34113  Py_XDECREF(tmp);
34114  tmp = ((PyObject*)p->edgeNodesArray);
34115  p->edgeNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34116  Py_XDECREF(tmp);
34117  tmp = ((PyObject*)p->nodeStarArray);
34118  p->nodeStarArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34119  Py_XDECREF(tmp);
34120  tmp = ((PyObject*)p->nodeStarOffsets);
34121  p->nodeStarOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34122  Py_XDECREF(tmp);
34123  tmp = ((PyObject*)p->elementMaterialTypes);
34124  p->elementMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34125  Py_XDECREF(tmp);
34126  tmp = ((PyObject*)p->elementBoundaryMaterialTypes);
34127  p->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34128  Py_XDECREF(tmp);
34129  tmp = ((PyObject*)p->nodeMaterialTypes);
34130  p->nodeMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34131  Py_XDECREF(tmp);
34132  tmp = ((PyObject*)p->nodeArray);
34133  p->nodeArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34134  Py_XDECREF(tmp);
34135  tmp = ((PyObject*)p->elementIJK);
34136  p->elementIJK = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34137  Py_XDECREF(tmp);
34138  tmp = ((PyObject*)p->weights);
34139  p->weights = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34140  Py_XDECREF(tmp);
34141  tmp = ((PyObject*)p->U_KNOT);
34142  p->U_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34143  Py_XDECREF(tmp);
34144  tmp = ((PyObject*)p->V_KNOT);
34145  p->V_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34146  Py_XDECREF(tmp);
34147  tmp = ((PyObject*)p->W_KNOT);
34148  p->W_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34149  Py_XDECREF(tmp);
34150  tmp = ((PyObject*)p->elementDiametersArray);
34151  p->elementDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34152  Py_XDECREF(tmp);
34153  tmp = ((PyObject*)p->elementInnerDiametersArray);
34154  p->elementInnerDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34155  Py_XDECREF(tmp);
34156  tmp = ((PyObject*)p->elementBoundaryDiametersArray);
34157  p->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34158  Py_XDECREF(tmp);
34159  tmp = ((PyObject*)p->elementBarycentersArray);
34160  p->elementBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34161  Py_XDECREF(tmp);
34162  tmp = ((PyObject*)p->elementBoundaryBarycentersArray);
34163  p->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34164  Py_XDECREF(tmp);
34165  tmp = ((PyObject*)p->nodeDiametersArray);
34166  p->nodeDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34167  Py_XDECREF(tmp);
34168  tmp = ((PyObject*)p->nodeSupportArray);
34169  p->nodeSupportArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34170  Py_XDECREF(tmp);
34171  return 0;
34172 }
34173 
34174 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElements_global(PyObject *o, CYTHON_UNUSED void *x) {
34175  return __pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(o);
34176 }
34177 
34178 static int __pyx_setprop_10cmeshTools_5CMesh_nElements_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34179  if (v) {
34180  return __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(o, v);
34181  }
34182  else {
34183  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34184  return -1;
34185  }
34186 }
34187 
34188 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_global(PyObject *o, CYTHON_UNUSED void *x) {
34189  return __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(o);
34190 }
34191 
34192 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34193  if (v) {
34194  return __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(o, v);
34195  }
34196  else {
34197  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34198  return -1;
34199  }
34200 }
34201 
34202 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_element(PyObject *o, CYTHON_UNUSED void *x) {
34203  return __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(o);
34204 }
34205 
34206 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_element(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34207  if (v) {
34208  return __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(o, v);
34209  }
34210  else {
34211  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34212  return -1;
34213  }
34214 }
34215 
34216 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_elementBoundary(PyObject *o, CYTHON_UNUSED void *x) {
34217  return __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(o);
34218 }
34219 
34220 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_elementBoundary(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34221  if (v) {
34222  return __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(o, v);
34223  }
34224  else {
34225  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34226  return -1;
34227  }
34228 }
34229 
34230 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_element(PyObject *o, CYTHON_UNUSED void *x) {
34231  return __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(o);
34232 }
34233 
34234 static int __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_element(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34235  if (v) {
34236  return __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(o, v);
34237  }
34238  else {
34239  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34240  return -1;
34241  }
34242 }
34243 
34244 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
34245  return __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(o);
34246 }
34247 
34248 static int __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34249  if (v) {
34250  return __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(o, v);
34251  }
34252  else {
34253  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34254  return -1;
34255  }
34256 }
34257 
34258 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
34259  return __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(o);
34260 }
34261 
34262 static int __pyx_setprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34263  if (v) {
34264  return __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(o, v);
34265  }
34266  else {
34267  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34268  return -1;
34269  }
34270 }
34271 
34272 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
34273  return __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(o);
34274 }
34275 
34276 static int __pyx_setprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34277  if (v) {
34278  return __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(o, v);
34279  }
34280  else {
34281  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34282  return -1;
34283  }
34284 }
34285 
34286 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_max_nElements_node(PyObject *o, CYTHON_UNUSED void *x) {
34287  return __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(o);
34288 }
34289 
34290 static int __pyx_setprop_10cmeshTools_5CMesh_max_nElements_node(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34291  if (v) {
34292  return __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(o, v);
34293  }
34294  else {
34295  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34296  return -1;
34297  }
34298 }
34299 
34300 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nEdges_global(PyObject *o, CYTHON_UNUSED void *x) {
34301  return __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(o);
34302 }
34303 
34304 static int __pyx_setprop_10cmeshTools_5CMesh_nEdges_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34305  if (v) {
34306  return __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(o, v);
34307  }
34308  else {
34309  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34310  return -1;
34311  }
34312 }
34313 
34314 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node(PyObject *o, CYTHON_UNUSED void *x) {
34315  return __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(o);
34316 }
34317 
34318 static int __pyx_setprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34319  if (v) {
34320  return __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(o, v);
34321  }
34322  else {
34323  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34324  return -1;
34325  }
34326 }
34327 
34328 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
34329  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(o);
34330 }
34331 
34332 static int __pyx_setprop_10cmeshTools_5CMesh_elementNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34333  if (v) {
34334  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(o, v);
34335  }
34336  else {
34337  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(o);
34338  }
34339 }
34340 
34341 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeElementsArray(PyObject *o, CYTHON_UNUSED void *x) {
34342  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(o);
34343 }
34344 
34345 static int __pyx_setprop_10cmeshTools_5CMesh_nodeElementsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34346  if (v) {
34347  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(o, v);
34348  }
34349  else {
34350  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(o);
34351  }
34352 }
34353 
34354 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeElementOffsets(PyObject *o, CYTHON_UNUSED void *x) {
34355  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(o);
34356 }
34357 
34358 static int __pyx_setprop_10cmeshTools_5CMesh_nodeElementOffsets(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34359  if (v) {
34360  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(o, v);
34361  }
34362  else {
34363  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(o);
34364  }
34365 }
34366 
34367 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementNeighborsArray(PyObject *o, CYTHON_UNUSED void *x) {
34368  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(o);
34369 }
34370 
34371 static int __pyx_setprop_10cmeshTools_5CMesh_elementNeighborsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34372  if (v) {
34373  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(o, v);
34374  }
34375  else {
34376  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(o);
34377  }
34378 }
34379 
34380 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34381  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(o);
34382 }
34383 
34384 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34385  if (v) {
34386  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(o, v);
34387  }
34388  else {
34389  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(o);
34390  }
34391 }
34392 
34393 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
34394  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(o);
34395 }
34396 
34397 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34398  if (v) {
34399  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(o, v);
34400  }
34401  else {
34402  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(o);
34403  }
34404 }
34405 
34406 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryElementsArray(PyObject *o, CYTHON_UNUSED void *x) {
34407  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(o);
34408 }
34409 
34410 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryElementsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34411  if (v) {
34412  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(o, v);
34413  }
34414  else {
34415  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(o);
34416  }
34417 }
34418 
34419 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34420  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(o);
34421 }
34422 
34423 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34424  if (v) {
34425  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(o, v);
34426  }
34427  else {
34428  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(o);
34429  }
34430 }
34431 
34432 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_interiorElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34433  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(o);
34434 }
34435 
34436 static int __pyx_setprop_10cmeshTools_5CMesh_interiorElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34437  if (v) {
34438  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(o, v);
34439  }
34440  else {
34441  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(o);
34442  }
34443 }
34444 
34445 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34446  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(o);
34447 }
34448 
34449 static int __pyx_setprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34450  if (v) {
34451  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(o, v);
34452  }
34453  else {
34454  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(o);
34455  }
34456 }
34457 
34458 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_edgeNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
34459  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(o);
34460 }
34461 
34462 static int __pyx_setprop_10cmeshTools_5CMesh_edgeNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34463  if (v) {
34464  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(o, v);
34465  }
34466  else {
34467  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(o);
34468  }
34469 }
34470 
34471 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeStarArray(PyObject *o, CYTHON_UNUSED void *x) {
34472  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(o);
34473 }
34474 
34475 static int __pyx_setprop_10cmeshTools_5CMesh_nodeStarArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34476  if (v) {
34477  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(o, v);
34478  }
34479  else {
34480  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(o);
34481  }
34482 }
34483 
34484 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeStarOffsets(PyObject *o, CYTHON_UNUSED void *x) {
34485  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(o);
34486 }
34487 
34488 static int __pyx_setprop_10cmeshTools_5CMesh_nodeStarOffsets(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34489  if (v) {
34490  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(o, v);
34491  }
34492  else {
34493  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(o);
34494  }
34495 }
34496 
34497 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
34498  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(o);
34499 }
34500 
34501 static int __pyx_setprop_10cmeshTools_5CMesh_elementMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34502  if (v) {
34503  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(o, v);
34504  }
34505  else {
34506  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(o);
34507  }
34508 }
34509 
34510 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
34511  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(o);
34512 }
34513 
34514 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34515  if (v) {
34516  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(o, v);
34517  }
34518  else {
34519  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(o);
34520  }
34521 }
34522 
34523 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
34524  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(o);
34525 }
34526 
34527 static int __pyx_setprop_10cmeshTools_5CMesh_nodeMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34528  if (v) {
34529  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(o, v);
34530  }
34531  else {
34532  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(o);
34533  }
34534 }
34535 
34536 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeArray(PyObject *o, CYTHON_UNUSED void *x) {
34537  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(o);
34538 }
34539 
34540 static int __pyx_setprop_10cmeshTools_5CMesh_nodeArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34541  if (v) {
34542  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(o, v);
34543  }
34544  else {
34545  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(o);
34546  }
34547 }
34548 
34549 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nx(PyObject *o, CYTHON_UNUSED void *x) {
34550  return __pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(o);
34551 }
34552 
34553 static int __pyx_setprop_10cmeshTools_5CMesh_nx(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34554  if (v) {
34555  return __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(o, v);
34556  }
34557  else {
34558  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34559  return -1;
34560  }
34561 }
34562 
34563 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_ny(PyObject *o, CYTHON_UNUSED void *x) {
34564  return __pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(o);
34565 }
34566 
34567 static int __pyx_setprop_10cmeshTools_5CMesh_ny(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34568  if (v) {
34569  return __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(o, v);
34570  }
34571  else {
34572  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34573  return -1;
34574  }
34575 }
34576 
34577 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nz(PyObject *o, CYTHON_UNUSED void *x) {
34578  return __pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(o);
34579 }
34580 
34581 static int __pyx_setprop_10cmeshTools_5CMesh_nz(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34582  if (v) {
34583  return __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(o, v);
34584  }
34585  else {
34586  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34587  return -1;
34588  }
34589 }
34590 
34591 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_px(PyObject *o, CYTHON_UNUSED void *x) {
34592  return __pyx_pw_10cmeshTools_5CMesh_2px_1__get__(o);
34593 }
34594 
34595 static int __pyx_setprop_10cmeshTools_5CMesh_px(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34596  if (v) {
34597  return __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(o, v);
34598  }
34599  else {
34600  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34601  return -1;
34602  }
34603 }
34604 
34605 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_py(PyObject *o, CYTHON_UNUSED void *x) {
34606  return __pyx_pw_10cmeshTools_5CMesh_2py_1__get__(o);
34607 }
34608 
34609 static int __pyx_setprop_10cmeshTools_5CMesh_py(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34610  if (v) {
34611  return __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(o, v);
34612  }
34613  else {
34614  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34615  return -1;
34616  }
34617 }
34618 
34619 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_pz(PyObject *o, CYTHON_UNUSED void *x) {
34620  return __pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(o);
34621 }
34622 
34623 static int __pyx_setprop_10cmeshTools_5CMesh_pz(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34624  if (v) {
34625  return __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(o, v);
34626  }
34627  else {
34628  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34629  return -1;
34630  }
34631 }
34632 
34633 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementIJK(PyObject *o, CYTHON_UNUSED void *x) {
34634  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(o);
34635 }
34636 
34637 static int __pyx_setprop_10cmeshTools_5CMesh_elementIJK(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34638  if (v) {
34639  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(o, v);
34640  }
34641  else {
34642  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(o);
34643  }
34644 }
34645 
34646 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_weights(PyObject *o, CYTHON_UNUSED void *x) {
34647  return __pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(o);
34648 }
34649 
34650 static int __pyx_setprop_10cmeshTools_5CMesh_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34651  if (v) {
34652  return __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(o, v);
34653  }
34654  else {
34655  return __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(o);
34656  }
34657 }
34658 
34659 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_U_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34660  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(o);
34661 }
34662 
34663 static int __pyx_setprop_10cmeshTools_5CMesh_U_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34664  if (v) {
34665  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(o, v);
34666  }
34667  else {
34668  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(o);
34669  }
34670 }
34671 
34672 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_V_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34673  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(o);
34674 }
34675 
34676 static int __pyx_setprop_10cmeshTools_5CMesh_V_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34677  if (v) {
34678  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(o, v);
34679  }
34680  else {
34681  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(o);
34682  }
34683 }
34684 
34685 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_W_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34686  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(o);
34687 }
34688 
34689 static int __pyx_setprop_10cmeshTools_5CMesh_W_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34690  if (v) {
34691  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(o, v);
34692  }
34693  else {
34694  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(o);
34695  }
34696 }
34697 
34698 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34699  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(o);
34700 }
34701 
34702 static int __pyx_setprop_10cmeshTools_5CMesh_elementDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34703  if (v) {
34704  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(o, v);
34705  }
34706  else {
34707  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(o);
34708  }
34709 }
34710 
34711 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementInnerDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34712  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(o);
34713 }
34714 
34715 static int __pyx_setprop_10cmeshTools_5CMesh_elementInnerDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34716  if (v) {
34717  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(o, v);
34718  }
34719  else {
34720  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(o);
34721  }
34722 }
34723 
34724 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34725  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(o);
34726 }
34727 
34728 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34729  if (v) {
34730  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(o, v);
34731  }
34732  else {
34733  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(o);
34734  }
34735 }
34736 
34737 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBarycentersArray(PyObject *o, CYTHON_UNUSED void *x) {
34738  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(o);
34739 }
34740 
34741 static int __pyx_setprop_10cmeshTools_5CMesh_elementBarycentersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34742  if (v) {
34743  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(o, v);
34744  }
34745  else {
34746  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(o);
34747  }
34748 }
34749 
34750 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray(PyObject *o, CYTHON_UNUSED void *x) {
34751  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(o);
34752 }
34753 
34754 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34755  if (v) {
34756  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(o, v);
34757  }
34758  else {
34759  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(o);
34760  }
34761 }
34762 
34763 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34764  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(o);
34765 }
34766 
34767 static int __pyx_setprop_10cmeshTools_5CMesh_nodeDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34768  if (v) {
34769  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(o, v);
34770  }
34771  else {
34772  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(o);
34773  }
34774 }
34775 
34776 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeSupportArray(PyObject *o, CYTHON_UNUSED void *x) {
34777  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(o);
34778 }
34779 
34780 static int __pyx_setprop_10cmeshTools_5CMesh_nodeSupportArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34781  if (v) {
34782  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(o, v);
34783  }
34784  else {
34785  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(o);
34786  }
34787 }
34788 
34789 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_h(PyObject *o, CYTHON_UNUSED void *x) {
34790  return __pyx_pw_10cmeshTools_5CMesh_1h_1__get__(o);
34791 }
34792 
34793 static int __pyx_setprop_10cmeshTools_5CMesh_h(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34794  if (v) {
34795  return __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(o, v);
34796  }
34797  else {
34798  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34799  return -1;
34800  }
34801 }
34802 
34803 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_hMin(PyObject *o, CYTHON_UNUSED void *x) {
34804  return __pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(o);
34805 }
34806 
34807 static int __pyx_setprop_10cmeshTools_5CMesh_hMin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34808  if (v) {
34809  return __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(o, v);
34810  }
34811  else {
34812  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34813  return -1;
34814  }
34815 }
34816 
34817 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_sigmaMax(PyObject *o, CYTHON_UNUSED void *x) {
34818  return __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(o);
34819 }
34820 
34821 static int __pyx_setprop_10cmeshTools_5CMesh_sigmaMax(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34822  if (v) {
34823  return __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(o, v);
34824  }
34825  else {
34826  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34827  return -1;
34828  }
34829 }
34830 
34831 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_volume(PyObject *o, CYTHON_UNUSED void *x) {
34832  return __pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(o);
34833 }
34834 
34835 static int __pyx_setprop_10cmeshTools_5CMesh_volume(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34836  if (v) {
34837  return __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(o, v);
34838  }
34839  else {
34840  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34841  return -1;
34842  }
34843 }
34844 
34845 static PyMethodDef __pyx_methods_10cmeshTools_CMesh[] = {
34846  {"buildPythonMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_3buildPythonMeshInterface, METH_NOARGS, 0},
34847  {"buildPythonMeshInterfaceNoArrays", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterfaceNoArrays, METH_NOARGS, 0},
34848  {"__reduce_cython__", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_7__reduce_cython__, METH_NOARGS, 0},
34849  {"__setstate_cython__", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_9__setstate_cython__, METH_O, 0},
34850  {0, 0, 0, 0}
34851 };
34852 
34853 static struct PyGetSetDef __pyx_getsets_10cmeshTools_CMesh[] = {
34854  {(char *)"nElements_global", __pyx_getprop_10cmeshTools_5CMesh_nElements_global, __pyx_setprop_10cmeshTools_5CMesh_nElements_global, (char *)0, 0},
34855  {(char *)"nNodes_global", __pyx_getprop_10cmeshTools_5CMesh_nNodes_global, __pyx_setprop_10cmeshTools_5CMesh_nNodes_global, (char *)0, 0},
34856  {(char *)"nNodes_element", __pyx_getprop_10cmeshTools_5CMesh_nNodes_element, __pyx_setprop_10cmeshTools_5CMesh_nNodes_element, (char *)0, 0},
34857  {(char *)"nNodes_elementBoundary", __pyx_getprop_10cmeshTools_5CMesh_nNodes_elementBoundary, __pyx_setprop_10cmeshTools_5CMesh_nNodes_elementBoundary, (char *)0, 0},
34858  {(char *)"nElementBoundaries_element", __pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_element, __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_element, (char *)0, 0},
34859  {(char *)"nElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_global, (char *)0, 0},
34860  {(char *)"nInteriorElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global, (char *)0, 0},
34861  {(char *)"nExteriorElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global, (char *)0, 0},
34862  {(char *)"max_nElements_node", __pyx_getprop_10cmeshTools_5CMesh_max_nElements_node, __pyx_setprop_10cmeshTools_5CMesh_max_nElements_node, (char *)0, 0},
34863  {(char *)"nEdges_global", __pyx_getprop_10cmeshTools_5CMesh_nEdges_global, __pyx_setprop_10cmeshTools_5CMesh_nEdges_global, (char *)0, 0},
34864  {(char *)"max_nNodeNeighbors_node", __pyx_getprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node, __pyx_setprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node, (char *)0, 0},
34865  {(char *)"elementNodesArray", __pyx_getprop_10cmeshTools_5CMesh_elementNodesArray, __pyx_setprop_10cmeshTools_5CMesh_elementNodesArray, (char *)0, 0},
34866  {(char *)"nodeElementsArray", __pyx_getprop_10cmeshTools_5CMesh_nodeElementsArray, __pyx_setprop_10cmeshTools_5CMesh_nodeElementsArray, (char *)0, 0},
34867  {(char *)"nodeElementOffsets", __pyx_getprop_10cmeshTools_5CMesh_nodeElementOffsets, __pyx_setprop_10cmeshTools_5CMesh_nodeElementOffsets, (char *)0, 0},
34868  {(char *)"elementNeighborsArray", __pyx_getprop_10cmeshTools_5CMesh_elementNeighborsArray, __pyx_setprop_10cmeshTools_5CMesh_elementNeighborsArray, (char *)0, 0},
34869  {(char *)"elementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundariesArray, (char *)0, 0},
34870  {(char *)"elementBoundaryNodesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryNodesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryNodesArray, (char *)0, 0},
34871  {(char *)"elementBoundaryElementsArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryElementsArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryElementsArray, (char *)0, 0},
34872  {(char *)"elementBoundaryLocalElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray, (char *)0, 0},
34873  {(char *)"interiorElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_interiorElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_interiorElementBoundariesArray, (char *)0, 0},
34874  {(char *)"exteriorElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray, (char *)0, 0},
34875  {(char *)"edgeNodesArray", __pyx_getprop_10cmeshTools_5CMesh_edgeNodesArray, __pyx_setprop_10cmeshTools_5CMesh_edgeNodesArray, (char *)0, 0},
34876  {(char *)"nodeStarArray", __pyx_getprop_10cmeshTools_5CMesh_nodeStarArray, __pyx_setprop_10cmeshTools_5CMesh_nodeStarArray, (char *)0, 0},
34877  {(char *)"nodeStarOffsets", __pyx_getprop_10cmeshTools_5CMesh_nodeStarOffsets, __pyx_setprop_10cmeshTools_5CMesh_nodeStarOffsets, (char *)0, 0},
34878  {(char *)"elementMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_elementMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_elementMaterialTypes, (char *)0, 0},
34879  {(char *)"elementBoundaryMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes, (char *)0, 0},
34880  {(char *)"nodeMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_nodeMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_nodeMaterialTypes, (char *)0, 0},
34881  {(char *)"nodeArray", __pyx_getprop_10cmeshTools_5CMesh_nodeArray, __pyx_setprop_10cmeshTools_5CMesh_nodeArray, (char *)0, 0},
34882  {(char *)"nx", __pyx_getprop_10cmeshTools_5CMesh_nx, __pyx_setprop_10cmeshTools_5CMesh_nx, (char *)0, 0},
34883  {(char *)"ny", __pyx_getprop_10cmeshTools_5CMesh_ny, __pyx_setprop_10cmeshTools_5CMesh_ny, (char *)0, 0},
34884  {(char *)"nz", __pyx_getprop_10cmeshTools_5CMesh_nz, __pyx_setprop_10cmeshTools_5CMesh_nz, (char *)0, 0},
34885  {(char *)"px", __pyx_getprop_10cmeshTools_5CMesh_px, __pyx_setprop_10cmeshTools_5CMesh_px, (char *)0, 0},
34886  {(char *)"py", __pyx_getprop_10cmeshTools_5CMesh_py, __pyx_setprop_10cmeshTools_5CMesh_py, (char *)0, 0},
34887  {(char *)"pz", __pyx_getprop_10cmeshTools_5CMesh_pz, __pyx_setprop_10cmeshTools_5CMesh_pz, (char *)0, 0},
34888  {(char *)"elementIJK", __pyx_getprop_10cmeshTools_5CMesh_elementIJK, __pyx_setprop_10cmeshTools_5CMesh_elementIJK, (char *)0, 0},
34889  {(char *)"weights", __pyx_getprop_10cmeshTools_5CMesh_weights, __pyx_setprop_10cmeshTools_5CMesh_weights, (char *)0, 0},
34890  {(char *)"U_KNOT", __pyx_getprop_10cmeshTools_5CMesh_U_KNOT, __pyx_setprop_10cmeshTools_5CMesh_U_KNOT, (char *)0, 0},
34891  {(char *)"V_KNOT", __pyx_getprop_10cmeshTools_5CMesh_V_KNOT, __pyx_setprop_10cmeshTools_5CMesh_V_KNOT, (char *)0, 0},
34892  {(char *)"W_KNOT", __pyx_getprop_10cmeshTools_5CMesh_W_KNOT, __pyx_setprop_10cmeshTools_5CMesh_W_KNOT, (char *)0, 0},
34893  {(char *)"elementDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementDiametersArray, (char *)0, 0},
34894  {(char *)"elementInnerDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementInnerDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementInnerDiametersArray, (char *)0, 0},
34895  {(char *)"elementBoundaryDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray, (char *)0, 0},
34896  {(char *)"elementBarycentersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBarycentersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBarycentersArray, (char *)0, 0},
34897  {(char *)"elementBoundaryBarycentersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray, (char *)0, 0},
34898  {(char *)"nodeDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_nodeDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_nodeDiametersArray, (char *)0, 0},
34899  {(char *)"nodeSupportArray", __pyx_getprop_10cmeshTools_5CMesh_nodeSupportArray, __pyx_setprop_10cmeshTools_5CMesh_nodeSupportArray, (char *)0, 0},
34900  {(char *)"h", __pyx_getprop_10cmeshTools_5CMesh_h, __pyx_setprop_10cmeshTools_5CMesh_h, (char *)0, 0},
34901  {(char *)"hMin", __pyx_getprop_10cmeshTools_5CMesh_hMin, __pyx_setprop_10cmeshTools_5CMesh_hMin, (char *)0, 0},
34902  {(char *)"sigmaMax", __pyx_getprop_10cmeshTools_5CMesh_sigmaMax, __pyx_setprop_10cmeshTools_5CMesh_sigmaMax, (char *)0, 0},
34903  {(char *)"volume", __pyx_getprop_10cmeshTools_5CMesh_volume, __pyx_setprop_10cmeshTools_5CMesh_volume, (char *)0, 0},
34904  {0, 0, 0, 0, 0}
34905 };
34906 
34907 static PyTypeObject __pyx_type_10cmeshTools_CMesh = {
34908  PyVarObject_HEAD_INIT(0, 0)
34909  "cmeshTools.CMesh", /*tp_name*/
34910  sizeof(struct __pyx_obj_10cmeshTools_CMesh), /*tp_basicsize*/
34911  0, /*tp_itemsize*/
34912  __pyx_tp_dealloc_10cmeshTools_CMesh, /*tp_dealloc*/
34913  #if PY_VERSION_HEX < 0x030800b4
34914  0, /*tp_print*/
34915  #endif
34916  #if PY_VERSION_HEX >= 0x030800b4
34917  0, /*tp_vectorcall_offset*/
34918  #endif
34919  0, /*tp_getattr*/
34920  0, /*tp_setattr*/
34921  #if PY_MAJOR_VERSION < 3
34922  0, /*tp_compare*/
34923  #endif
34924  #if PY_MAJOR_VERSION >= 3
34925  0, /*tp_as_async*/
34926  #endif
34927  0, /*tp_repr*/
34928  0, /*tp_as_number*/
34929  0, /*tp_as_sequence*/
34930  0, /*tp_as_mapping*/
34931  0, /*tp_hash*/
34932  0, /*tp_call*/
34933  0, /*tp_str*/
34934  0, /*tp_getattro*/
34935  0, /*tp_setattro*/
34936  0, /*tp_as_buffer*/
34937  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34938  0, /*tp_doc*/
34939  __pyx_tp_traverse_10cmeshTools_CMesh, /*tp_traverse*/
34940  __pyx_tp_clear_10cmeshTools_CMesh, /*tp_clear*/
34941  0, /*tp_richcompare*/
34942  0, /*tp_weaklistoffset*/
34943  0, /*tp_iter*/
34944  0, /*tp_iternext*/
34945  __pyx_methods_10cmeshTools_CMesh, /*tp_methods*/
34946  0, /*tp_members*/
34947  __pyx_getsets_10cmeshTools_CMesh, /*tp_getset*/
34948  0, /*tp_base*/
34949  0, /*tp_dict*/
34950  0, /*tp_descr_get*/
34951  0, /*tp_descr_set*/
34952  0, /*tp_dictoffset*/
34953  __pyx_pw_10cmeshTools_5CMesh_1__init__, /*tp_init*/
34954  0, /*tp_alloc*/
34955  __pyx_tp_new_10cmeshTools_CMesh, /*tp_new*/
34956  0, /*tp_free*/
34957  0, /*tp_is_gc*/
34958  0, /*tp_bases*/
34959  0, /*tp_mro*/
34960  0, /*tp_cache*/
34961  0, /*tp_subclasses*/
34962  0, /*tp_weaklist*/
34963  0, /*tp_del*/
34964  0, /*tp_version_tag*/
34965  #if PY_VERSION_HEX >= 0x030400a1
34966  0, /*tp_finalize*/
34967  #endif
34968  #if PY_VERSION_HEX >= 0x030800b1
34969  0, /*tp_vectorcall*/
34970  #endif
34971  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34972  0, /*tp_print*/
34973  #endif
34974 };
34975 
34976 static PyObject *__pyx_tp_new_10cmeshTools_CMultilevelMesh(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34977  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p;
34978  PyObject *o;
34979  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34980  o = (*t->tp_alloc)(t, 0);
34981  } else {
34982  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34983  }
34984  if (unlikely(!o)) return 0;
34985  p = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o);
34986  p->cmeshList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34987  p->elementParentsArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34988  p->elementChildrenArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34989  p->elementChildrenOffsetsList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34990  return o;
34991 }
34992 
34993 static void __pyx_tp_dealloc_10cmeshTools_CMultilevelMesh(PyObject *o) {
34994  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
34995  #if CYTHON_USE_TP_FINALIZE
34996  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34997  if (PyObject_CallFinalizerFromDealloc(o)) return;
34998  }
34999  #endif
35000  PyObject_GC_UnTrack(o);
35001  Py_CLEAR(p->cmeshList);
35002  Py_CLEAR(p->elementParentsArrayList);
35003  Py_CLEAR(p->elementChildrenArrayList);
35004  Py_CLEAR(p->elementChildrenOffsetsList);
35005  (*Py_TYPE(o)->tp_free)(o);
35006 }
35007 
35008 static int __pyx_tp_traverse_10cmeshTools_CMultilevelMesh(PyObject *o, visitproc v, void *a) {
35009  int e;
35010  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
35011  if (p->cmeshList) {
35012  e = (*v)(p->cmeshList, a); if (e) return e;
35013  }
35014  if (p->elementParentsArrayList) {
35015  e = (*v)(p->elementParentsArrayList, a); if (e) return e;
35016  }
35017  if (p->elementChildrenArrayList) {
35018  e = (*v)(p->elementChildrenArrayList, a); if (e) return e;
35019  }
35020  if (p->elementChildrenOffsetsList) {
35021  e = (*v)(p->elementChildrenOffsetsList, a); if (e) return e;
35022  }
35023  return 0;
35024 }
35025 
35026 static int __pyx_tp_clear_10cmeshTools_CMultilevelMesh(PyObject *o) {
35027  PyObject* tmp;
35028  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
35029  tmp = ((PyObject*)p->cmeshList);
35030  p->cmeshList = ((PyObject*)Py_None); Py_INCREF(Py_None);
35031  Py_XDECREF(tmp);
35032  tmp = ((PyObject*)p->elementParentsArrayList);
35033  p->elementParentsArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
35034  Py_XDECREF(tmp);
35035  tmp = ((PyObject*)p->elementChildrenArrayList);
35036  p->elementChildrenArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
35037  Py_XDECREF(tmp);
35038  tmp = ((PyObject*)p->elementChildrenOffsetsList);
35039  p->elementChildrenOffsetsList = ((PyObject*)Py_None); Py_INCREF(Py_None);
35040  Py_XDECREF(tmp);
35041  return 0;
35042 }
35043 
35044 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_nLevels(PyObject *o, CYTHON_UNUSED void *x) {
35045  return __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(o);
35046 }
35047 
35048 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_nLevels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35049  if (v) {
35050  return __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(o, v);
35051  }
35052  else {
35053  PyErr_SetString(PyExc_NotImplementedError, "__del__");
35054  return -1;
35055  }
35056 }
35057 
35058 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_cmeshList(PyObject *o, CYTHON_UNUSED void *x) {
35059  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(o);
35060 }
35061 
35062 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_cmeshList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35063  if (v) {
35064  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(o, v);
35065  }
35066  else {
35067  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(o);
35068  }
35069 }
35070 
35071 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList(PyObject *o, CYTHON_UNUSED void *x) {
35072  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(o);
35073 }
35074 
35075 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35076  if (v) {
35077  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(o, v);
35078  }
35079  else {
35080  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(o);
35081  }
35082 }
35083 
35084 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList(PyObject *o, CYTHON_UNUSED void *x) {
35085  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(o);
35086 }
35087 
35088 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35089  if (v) {
35090  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(o, v);
35091  }
35092  else {
35093  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(o);
35094  }
35095 }
35096 
35097 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList(PyObject *o, CYTHON_UNUSED void *x) {
35098  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(o);
35099 }
35100 
35101 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35102  if (v) {
35103  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(o, v);
35104  }
35105  else {
35106  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(o);
35107  }
35108 }
35109 
35110 static PyMethodDef __pyx_methods_10cmeshTools_CMultilevelMesh[] = {
35111  {"buildPythonMultilevelMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface, METH_NOARGS, 0},
35112  {"__reduce_cython__", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__, METH_NOARGS, 0},
35113  {"__setstate_cython__", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__, METH_O, 0},
35114  {0, 0, 0, 0}
35115 };
35116 
35117 static struct PyGetSetDef __pyx_getsets_10cmeshTools_CMultilevelMesh[] = {
35118  {(char *)"nLevels", __pyx_getprop_10cmeshTools_15CMultilevelMesh_nLevels, __pyx_setprop_10cmeshTools_15CMultilevelMesh_nLevels, (char *)0, 0},
35119  {(char *)"cmeshList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_cmeshList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_cmeshList, (char *)0, 0},
35120  {(char *)"elementParentsArrayList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList, (char *)0, 0},
35121  {(char *)"elementChildrenArrayList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList, (char *)0, 0},
35122  {(char *)"elementChildrenOffsetsList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList, (char *)0, 0},
35123  {0, 0, 0, 0, 0}
35124 };
35125 
35126 static PyTypeObject __pyx_type_10cmeshTools_CMultilevelMesh = {
35127  PyVarObject_HEAD_INIT(0, 0)
35128  "cmeshTools.CMultilevelMesh", /*tp_name*/
35129  sizeof(struct __pyx_obj_10cmeshTools_CMultilevelMesh), /*tp_basicsize*/
35130  0, /*tp_itemsize*/
35131  __pyx_tp_dealloc_10cmeshTools_CMultilevelMesh, /*tp_dealloc*/
35132  #if PY_VERSION_HEX < 0x030800b4
35133  0, /*tp_print*/
35134  #endif
35135  #if PY_VERSION_HEX >= 0x030800b4
35136  0, /*tp_vectorcall_offset*/
35137  #endif
35138  0, /*tp_getattr*/
35139  0, /*tp_setattr*/
35140  #if PY_MAJOR_VERSION < 3
35141  0, /*tp_compare*/
35142  #endif
35143  #if PY_MAJOR_VERSION >= 3
35144  0, /*tp_as_async*/
35145  #endif
35146  0, /*tp_repr*/
35147  0, /*tp_as_number*/
35148  0, /*tp_as_sequence*/
35149  0, /*tp_as_mapping*/
35150  0, /*tp_hash*/
35151  0, /*tp_call*/
35152  0, /*tp_str*/
35153  0, /*tp_getattro*/
35154  0, /*tp_setattro*/
35155  0, /*tp_as_buffer*/
35156  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35157  0, /*tp_doc*/
35158  __pyx_tp_traverse_10cmeshTools_CMultilevelMesh, /*tp_traverse*/
35159  __pyx_tp_clear_10cmeshTools_CMultilevelMesh, /*tp_clear*/
35160  0, /*tp_richcompare*/
35161  0, /*tp_weaklistoffset*/
35162  0, /*tp_iter*/
35163  0, /*tp_iternext*/
35164  __pyx_methods_10cmeshTools_CMultilevelMesh, /*tp_methods*/
35165  0, /*tp_members*/
35166  __pyx_getsets_10cmeshTools_CMultilevelMesh, /*tp_getset*/
35167  0, /*tp_base*/
35168  0, /*tp_dict*/
35169  0, /*tp_descr_get*/
35170  0, /*tp_descr_set*/
35171  0, /*tp_dictoffset*/
35172  __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__, /*tp_init*/
35173  0, /*tp_alloc*/
35174  __pyx_tp_new_10cmeshTools_CMultilevelMesh, /*tp_new*/
35175  0, /*tp_free*/
35176  0, /*tp_is_gc*/
35177  0, /*tp_bases*/
35178  0, /*tp_mro*/
35179  0, /*tp_cache*/
35180  0, /*tp_subclasses*/
35181  0, /*tp_weaklist*/
35182  0, /*tp_del*/
35183  0, /*tp_version_tag*/
35184  #if PY_VERSION_HEX >= 0x030400a1
35185  0, /*tp_finalize*/
35186  #endif
35187  #if PY_VERSION_HEX >= 0x030800b1
35188  0, /*tp_vectorcall*/
35189  #endif
35190  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
35191  0, /*tp_print*/
35192  #endif
35193 };
35194 static struct __pyx_vtabstruct_array __pyx_vtable_array;
35195 
35196 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
35197  struct __pyx_array_obj *p;
35198  PyObject *o;
35199  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
35200  o = (*t->tp_alloc)(t, 0);
35201  } else {
35202  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
35203  }
35204  if (unlikely(!o)) return 0;
35205  p = ((struct __pyx_array_obj *)o);
35206  p->__pyx_vtab = __pyx_vtabptr_array;
35207  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
35208  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
35209  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
35210  return o;
35211  bad:
35212  Py_DECREF(o); o = 0;
35213  return NULL;
35214 }
35215 
35216 static void __pyx_tp_dealloc_array(PyObject *o) {
35217  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
35218  #if CYTHON_USE_TP_FINALIZE
35219  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
35220  if (PyObject_CallFinalizerFromDealloc(o)) return;
35221  }
35222  #endif
35223  {
35224  PyObject *etype, *eval, *etb;
35225  PyErr_Fetch(&etype, &eval, &etb);
35226  ++Py_REFCNT(o);
35227  __pyx_array___dealloc__(o);
35228  --Py_REFCNT(o);
35229  PyErr_Restore(etype, eval, etb);
35230  }
35231  Py_CLEAR(p->mode);
35232  Py_CLEAR(p->_format);
35233  (*Py_TYPE(o)->tp_free)(o);
35234 }
35235 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
35236  PyObject *r;
35237  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
35238  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
35239  Py_DECREF(x);
35240  return r;
35241 }
35242 
35243 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
35244  if (v) {
35245  return __pyx_array___setitem__(o, i, v);
35246  }
35247  else {
35248  PyErr_Format(PyExc_NotImplementedError,
35249  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
35250  return -1;
35251  }
35252 }
35253 
35254 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
35255  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
35256  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
35257  PyErr_Clear();
35258  v = __pyx_array___getattr__(o, n);
35259  }
35260  return v;
35261 }
35262 
35263 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
35264  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
35265 }
35266 
35267 static PyMethodDef __pyx_methods_array[] = {
35268  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
35269  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
35270  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
35271  {0, 0, 0, 0}
35272 };
35273 
35274 static struct PyGetSetDef __pyx_getsets_array[] = {
35275  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
35276  {0, 0, 0, 0, 0}
35277 };
35278 
35279 static PySequenceMethods __pyx_tp_as_sequence_array = {
35280  __pyx_array___len__, /*sq_length*/
35281  0, /*sq_concat*/
35282  0, /*sq_repeat*/
35283  __pyx_sq_item_array, /*sq_item*/
35284  0, /*sq_slice*/
35285  0, /*sq_ass_item*/
35286  0, /*sq_ass_slice*/
35287  0, /*sq_contains*/
35288  0, /*sq_inplace_concat*/
35289  0, /*sq_inplace_repeat*/
35290 };
35291 
35292 static PyMappingMethods __pyx_tp_as_mapping_array = {
35293  __pyx_array___len__, /*mp_length*/
35294  __pyx_array___getitem__, /*mp_subscript*/
35295  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
35296 };
35297 
35298 static PyBufferProcs __pyx_tp_as_buffer_array = {
35299  #if PY_MAJOR_VERSION < 3
35300  0, /*bf_getreadbuffer*/
35301  #endif
35302  #if PY_MAJOR_VERSION < 3
35303  0, /*bf_getwritebuffer*/
35304  #endif
35305  #if PY_MAJOR_VERSION < 3
35306  0, /*bf_getsegcount*/
35307  #endif
35308  #if PY_MAJOR_VERSION < 3
35309  0, /*bf_getcharbuffer*/
35310  #endif
35311  __pyx_array_getbuffer, /*bf_getbuffer*/
35312  0, /*bf_releasebuffer*/
35313 };
35314 
35315 static PyTypeObject __pyx_type___pyx_array = {
35316  PyVarObject_HEAD_INIT(0, 0)
35317  "cmeshTools.array", /*tp_name*/
35318  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
35319  0, /*tp_itemsize*/
35320  __pyx_tp_dealloc_array, /*tp_dealloc*/
35321  #if PY_VERSION_HEX < 0x030800b4
35322  0, /*tp_print*/
35323  #endif
35324  #if PY_VERSION_HEX >= 0x030800b4
35325  0, /*tp_vectorcall_offset*/
35326  #endif
35327  0, /*tp_getattr*/
35328  0, /*tp_setattr*/
35329  #if PY_MAJOR_VERSION < 3
35330  0, /*tp_compare*/
35331  #endif
35332  #if PY_MAJOR_VERSION >= 3
35333  0, /*tp_as_async*/
35334  #endif
35335  0, /*tp_repr*/
35336  0, /*tp_as_number*/
35337  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
35338  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
35339  0, /*tp_hash*/
35340  0, /*tp_call*/
35341  0, /*tp_str*/
35342  __pyx_tp_getattro_array, /*tp_getattro*/
35343  0, /*tp_setattro*/
35344  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
35345  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
35346  0, /*tp_doc*/
35347  0, /*tp_traverse*/
35348  0, /*tp_clear*/
35349  0, /*tp_richcompare*/
35350  0, /*tp_weaklistoffset*/
35351  0, /*tp_iter*/
35352  0, /*tp_iternext*/
35353  __pyx_methods_array, /*tp_methods*/
35354  0, /*tp_members*/
35355  __pyx_getsets_array, /*tp_getset*/
35356  0, /*tp_base*/
35357  0, /*tp_dict*/
35358  0, /*tp_descr_get*/
35359  0, /*tp_descr_set*/
35360  0, /*tp_dictoffset*/
35361  0, /*tp_init*/
35362  0, /*tp_alloc*/
35363  __pyx_tp_new_array, /*tp_new*/
35364  0, /*tp_free*/
35365  0, /*tp_is_gc*/
35366  0, /*tp_bases*/
35367  0, /*tp_mro*/
35368  0, /*tp_cache*/
35369  0, /*tp_subclasses*/
35370  0, /*tp_weaklist*/
35371  0, /*tp_del*/
35372  0, /*tp_version_tag*/
35373  #if PY_VERSION_HEX >= 0x030400a1
35374  0, /*tp_finalize*/
35375  #endif
35376  #if PY_VERSION_HEX >= 0x030800b1
35377  0, /*tp_vectorcall*/
35378  #endif
35379  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
35380  0, /*tp_print*/
35381  #endif
35382 };
35383 
35384 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
35385  struct __pyx_MemviewEnum_obj *p;
35386  PyObject *o;
35387  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
35388  o = (*t->tp_alloc)(t, 0);
35389  } else {
35390  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
35391  }
35392  if (unlikely(!o)) return 0;
35393  p = ((struct __pyx_MemviewEnum_obj *)o);
35394  p->name = Py_None; Py_INCREF(Py_None);
35395  return o;
35396 }
35397 
35398 static void __pyx_tp_dealloc_Enum(PyObject *o) {
35399  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
35400  #if CYTHON_USE_TP_FINALIZE
35401  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
35402  if (PyObject_CallFinalizerFromDealloc(o)) return;
35403  }
35404  #endif
35405  PyObject_GC_UnTrack(o);
35406  Py_CLEAR(p->name);
35407  (*Py_TYPE(o)->tp_free)(o);
35408 }
35409 
35410 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
35411  int e;
35412  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
35413  if (p->name) {
35414  e = (*v)(p->name, a); if (e) return e;
35415  }
35416  return 0;
35417 }
35418 
35419 static int __pyx_tp_clear_Enum(PyObject *o) {
35420  PyObject* tmp;
35421  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
35422  tmp = ((PyObject*)p->name);
35423  p->name = Py_None; Py_INCREF(Py_None);
35424  Py_XDECREF(tmp);
35425  return 0;
35426 }
35427 
35428 static PyMethodDef __pyx_methods_Enum[] = {
35429  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
35430  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
35431  {0, 0, 0, 0}
35432 };
35433 
35434 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
35435  PyVarObject_HEAD_INIT(0, 0)
35436  "cmeshTools.Enum", /*tp_name*/
35437  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
35438  0, /*tp_itemsize*/
35439  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
35440  #if PY_VERSION_HEX < 0x030800b4
35441  0, /*tp_print*/
35442  #endif
35443  #if PY_VERSION_HEX >= 0x030800b4
35444  0, /*tp_vectorcall_offset*/
35445  #endif
35446  0, /*tp_getattr*/
35447  0, /*tp_setattr*/
35448  #if PY_MAJOR_VERSION < 3
35449  0, /*tp_compare*/
35450  #endif
35451  #if PY_MAJOR_VERSION >= 3
35452  0, /*tp_as_async*/
35453  #endif
35454  __pyx_MemviewEnum___repr__, /*tp_repr*/
35455  0, /*tp_as_number*/
35456  0, /*tp_as_sequence*/
35457  0, /*tp_as_mapping*/
35458  0, /*tp_hash*/
35459  0, /*tp_call*/
35460  0, /*tp_str*/
35461  0, /*tp_getattro*/
35462  0, /*tp_setattro*/
35463  0, /*tp_as_buffer*/
35464  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35465  0, /*tp_doc*/
35466  __pyx_tp_traverse_Enum, /*tp_traverse*/
35467  __pyx_tp_clear_Enum, /*tp_clear*/
35468  0, /*tp_richcompare*/
35469  0, /*tp_weaklistoffset*/
35470  0, /*tp_iter*/
35471  0, /*tp_iternext*/
35472  __pyx_methods_Enum, /*tp_methods*/
35473  0, /*tp_members*/
35474  0, /*tp_getset*/
35475  0, /*tp_base*/
35476  0, /*tp_dict*/
35477  0, /*tp_descr_get*/
35478  0, /*tp_descr_set*/
35479  0, /*tp_dictoffset*/
35480  __pyx_MemviewEnum___init__, /*tp_init*/
35481  0, /*tp_alloc*/
35482  __pyx_tp_new_Enum, /*tp_new*/
35483  0, /*tp_free*/
35484  0, /*tp_is_gc*/
35485  0, /*tp_bases*/
35486  0, /*tp_mro*/
35487  0, /*tp_cache*/
35488  0, /*tp_subclasses*/
35489  0, /*tp_weaklist*/
35490  0, /*tp_del*/
35491  0, /*tp_version_tag*/
35492  #if PY_VERSION_HEX >= 0x030400a1
35493  0, /*tp_finalize*/
35494  #endif
35495  #if PY_VERSION_HEX >= 0x030800b1
35496  0, /*tp_vectorcall*/
35497  #endif
35498  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
35499  0, /*tp_print*/
35500  #endif
35501 };
35502 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
35503 
35504 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
35505  struct __pyx_memoryview_obj *p;
35506  PyObject *o;
35507  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
35508  o = (*t->tp_alloc)(t, 0);
35509  } else {
35510  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
35511  }
35512  if (unlikely(!o)) return 0;
35513  p = ((struct __pyx_memoryview_obj *)o);
35514  p->__pyx_vtab = __pyx_vtabptr_memoryview;
35515  p->obj = Py_None; Py_INCREF(Py_None);
35516  p->_size = Py_None; Py_INCREF(Py_None);
35517  p->_array_interface = Py_None; Py_INCREF(Py_None);
35518  p->view.obj = NULL;
35519  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
35520  return o;
35521  bad:
35522  Py_DECREF(o); o = 0;
35523  return NULL;
35524 }
35525 
35526 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
35527  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
35528  #if CYTHON_USE_TP_FINALIZE
35529  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
35530  if (PyObject_CallFinalizerFromDealloc(o)) return;
35531  }
35532  #endif
35533  PyObject_GC_UnTrack(o);
35534  {
35535  PyObject *etype, *eval, *etb;
35536  PyErr_Fetch(&etype, &eval, &etb);
35537  ++Py_REFCNT(o);
35538  __pyx_memoryview___dealloc__(o);
35539  --Py_REFCNT(o);
35540  PyErr_Restore(etype, eval, etb);
35541  }
35542  Py_CLEAR(p->obj);
35543  Py_CLEAR(p->_size);
35544  Py_CLEAR(p->_array_interface);
35545  (*Py_TYPE(o)->tp_free)(o);
35546 }
35547 
35548 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
35549  int e;
35550  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
35551  if (p->obj) {
35552  e = (*v)(p->obj, a); if (e) return e;
35553  }
35554  if (p->_size) {
35555  e = (*v)(p->_size, a); if (e) return e;
35556  }
35557  if (p->_array_interface) {
35558  e = (*v)(p->_array_interface, a); if (e) return e;
35559  }
35560  if (p->view.obj) {
35561  e = (*v)(p->view.obj, a); if (e) return e;
35562  }
35563  return 0;
35564 }
35565 
35566 static int __pyx_tp_clear_memoryview(PyObject *o) {
35567  PyObject* tmp;
35568  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
35569  tmp = ((PyObject*)p->obj);
35570  p->obj = Py_None; Py_INCREF(Py_None);
35571  Py_XDECREF(tmp);
35572  tmp = ((PyObject*)p->_size);
35573  p->_size = Py_None; Py_INCREF(Py_None);
35574  Py_XDECREF(tmp);
35575  tmp = ((PyObject*)p->_array_interface);
35576  p->_array_interface = Py_None; Py_INCREF(Py_None);
35577  Py_XDECREF(tmp);
35578  Py_CLEAR(p->view.obj);
35579  return 0;
35580 }
35581 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
35582  PyObject *r;
35583  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
35584  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
35585  Py_DECREF(x);
35586  return r;
35587 }
35588 
35589 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
35590  if (v) {
35591  return __pyx_memoryview___setitem__(o, i, v);
35592  }
35593  else {
35594  PyErr_Format(PyExc_NotImplementedError,
35595  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
35596  return -1;
35597  }
35598 }
35599 
35600 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
35601  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
35602 }
35603 
35604 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
35605  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
35606 }
35607 
35608 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
35609  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
35610 }
35611 
35612 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
35613  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
35614 }
35615 
35616 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
35617  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
35618 }
35619 
35620 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
35621  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
35622 }
35623 
35624 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
35625  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
35626 }
35627 
35628 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
35629  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
35630 }
35631 
35632 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
35633  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
35634 }
35635 
35636 static PyMethodDef __pyx_methods_memoryview[] = {
35637  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
35638  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
35639  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
35640  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
35641  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
35642  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
35643  {0, 0, 0, 0}
35644 };
35645 
35646 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
35647  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
35648  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
35649  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
35650  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
35651  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
35652  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
35653  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
35654  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
35655  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
35656  {0, 0, 0, 0, 0}
35657 };
35658 
35659 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
35660  __pyx_memoryview___len__, /*sq_length*/
35661  0, /*sq_concat*/
35662  0, /*sq_repeat*/
35663  __pyx_sq_item_memoryview, /*sq_item*/
35664  0, /*sq_slice*/
35665  0, /*sq_ass_item*/
35666  0, /*sq_ass_slice*/
35667  0, /*sq_contains*/
35668  0, /*sq_inplace_concat*/
35669  0, /*sq_inplace_repeat*/
35670 };
35671 
35672 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
35673  __pyx_memoryview___len__, /*mp_length*/
35674  __pyx_memoryview___getitem__, /*mp_subscript*/
35675  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
35676 };
35677 
35678 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
35679  #if PY_MAJOR_VERSION < 3
35680  0, /*bf_getreadbuffer*/
35681  #endif
35682  #if PY_MAJOR_VERSION < 3
35683  0, /*bf_getwritebuffer*/
35684  #endif
35685  #if PY_MAJOR_VERSION < 3
35686  0, /*bf_getsegcount*/
35687  #endif
35688  #if PY_MAJOR_VERSION < 3
35689  0, /*bf_getcharbuffer*/
35690  #endif
35691  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
35692  0, /*bf_releasebuffer*/
35693 };
35694 
35695 static PyTypeObject __pyx_type___pyx_memoryview = {
35696  PyVarObject_HEAD_INIT(0, 0)
35697  "cmeshTools.memoryview", /*tp_name*/
35698  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
35699  0, /*tp_itemsize*/
35700  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
35701  #if PY_VERSION_HEX < 0x030800b4
35702  0, /*tp_print*/
35703  #endif
35704  #if PY_VERSION_HEX >= 0x030800b4
35705  0, /*tp_vectorcall_offset*/
35706  #endif
35707  0, /*tp_getattr*/
35708  0, /*tp_setattr*/
35709  #if PY_MAJOR_VERSION < 3
35710  0, /*tp_compare*/
35711  #endif
35712  #if PY_MAJOR_VERSION >= 3
35713  0, /*tp_as_async*/
35714  #endif
35715  __pyx_memoryview___repr__, /*tp_repr*/
35716  0, /*tp_as_number*/
35717  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
35718  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
35719  0, /*tp_hash*/
35720  0, /*tp_call*/
35721  __pyx_memoryview___str__, /*tp_str*/
35722  0, /*tp_getattro*/
35723  0, /*tp_setattro*/
35724  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
35725  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35726  0, /*tp_doc*/
35727  __pyx_tp_traverse_memoryview, /*tp_traverse*/
35728  __pyx_tp_clear_memoryview, /*tp_clear*/
35729  0, /*tp_richcompare*/
35730  0, /*tp_weaklistoffset*/
35731  0, /*tp_iter*/
35732  0, /*tp_iternext*/
35733  __pyx_methods_memoryview, /*tp_methods*/
35734  0, /*tp_members*/
35735  __pyx_getsets_memoryview, /*tp_getset*/
35736  0, /*tp_base*/
35737  0, /*tp_dict*/
35738  0, /*tp_descr_get*/
35739  0, /*tp_descr_set*/
35740  0, /*tp_dictoffset*/
35741  0, /*tp_init*/
35742  0, /*tp_alloc*/
35743  __pyx_tp_new_memoryview, /*tp_new*/
35744  0, /*tp_free*/
35745  0, /*tp_is_gc*/
35746  0, /*tp_bases*/
35747  0, /*tp_mro*/
35748  0, /*tp_cache*/
35749  0, /*tp_subclasses*/
35750  0, /*tp_weaklist*/
35751  0, /*tp_del*/
35752  0, /*tp_version_tag*/
35753  #if PY_VERSION_HEX >= 0x030400a1
35754  0, /*tp_finalize*/
35755  #endif
35756  #if PY_VERSION_HEX >= 0x030800b1
35757  0, /*tp_vectorcall*/
35758  #endif
35759  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
35760  0, /*tp_print*/
35761  #endif
35762 };
35763 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
35764 
35765 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
35766  struct __pyx_memoryviewslice_obj *p;
35767  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
35768  if (unlikely(!o)) return 0;
35769  p = ((struct __pyx_memoryviewslice_obj *)o);
35770  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
35771  p->from_object = Py_None; Py_INCREF(Py_None);
35772  p->from_slice.memview = NULL;
35773  return o;
35774 }
35775 
35776 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
35777  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35778  #if CYTHON_USE_TP_FINALIZE
35779  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
35780  if (PyObject_CallFinalizerFromDealloc(o)) return;
35781  }
35782  #endif
35783  PyObject_GC_UnTrack(o);
35784  {
35785  PyObject *etype, *eval, *etb;
35786  PyErr_Fetch(&etype, &eval, &etb);
35787  ++Py_REFCNT(o);
35788  __pyx_memoryviewslice___dealloc__(o);
35789  --Py_REFCNT(o);
35790  PyErr_Restore(etype, eval, etb);
35791  }
35792  Py_CLEAR(p->from_object);
35793  PyObject_GC_Track(o);
35794  __pyx_tp_dealloc_memoryview(o);
35795 }
35796 
35797 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
35798  int e;
35799  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35800  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
35801  if (p->from_object) {
35802  e = (*v)(p->from_object, a); if (e) return e;
35803  }
35804  return 0;
35805 }
35806 
35807 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
35808  PyObject* tmp;
35809  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35810  __pyx_tp_clear_memoryview(o);
35811  tmp = ((PyObject*)p->from_object);
35812  p->from_object = Py_None; Py_INCREF(Py_None);
35813  Py_XDECREF(tmp);
35814  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
35815  return 0;
35816 }
35817 
35818 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
35819  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
35820 }
35821 
35822 static PyMethodDef __pyx_methods__memoryviewslice[] = {
35823  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
35824  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
35825  {0, 0, 0, 0}
35826 };
35827 
35828 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
35829  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
35830  {0, 0, 0, 0, 0}
35831 };
35832 
35833 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
35834  PyVarObject_HEAD_INIT(0, 0)
35835  "cmeshTools._memoryviewslice", /*tp_name*/
35836  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
35837  0, /*tp_itemsize*/
35838  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
35839  #if PY_VERSION_HEX < 0x030800b4
35840  0, /*tp_print*/
35841  #endif
35842  #if PY_VERSION_HEX >= 0x030800b4
35843  0, /*tp_vectorcall_offset*/
35844  #endif
35845  0, /*tp_getattr*/
35846  0, /*tp_setattr*/
35847  #if PY_MAJOR_VERSION < 3
35848  0, /*tp_compare*/
35849  #endif
35850  #if PY_MAJOR_VERSION >= 3
35851  0, /*tp_as_async*/
35852  #endif
35853  #if CYTHON_COMPILING_IN_PYPY
35854  __pyx_memoryview___repr__, /*tp_repr*/
35855  #else
35856  0, /*tp_repr*/
35857  #endif
35858  0, /*tp_as_number*/
35859  0, /*tp_as_sequence*/
35860  0, /*tp_as_mapping*/
35861  0, /*tp_hash*/
35862  0, /*tp_call*/
35863  #if CYTHON_COMPILING_IN_PYPY
35864  __pyx_memoryview___str__, /*tp_str*/
35865  #else
35866  0, /*tp_str*/
35867  #endif
35868  0, /*tp_getattro*/
35869  0, /*tp_setattro*/
35870  0, /*tp_as_buffer*/
35871  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35872  "Internal class for passing memoryview slices to Python", /*tp_doc*/
35873  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
35874  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
35875  0, /*tp_richcompare*/
35876  0, /*tp_weaklistoffset*/
35877  0, /*tp_iter*/
35878  0, /*tp_iternext*/
35879  __pyx_methods__memoryviewslice, /*tp_methods*/
35880  0, /*tp_members*/
35881  __pyx_getsets__memoryviewslice, /*tp_getset*/
35882  0, /*tp_base*/
35883  0, /*tp_dict*/
35884  0, /*tp_descr_get*/
35885  0, /*tp_descr_set*/
35886  0, /*tp_dictoffset*/
35887  0, /*tp_init*/
35888  0, /*tp_alloc*/
35889  __pyx_tp_new__memoryviewslice, /*tp_new*/
35890  0, /*tp_free*/
35891  0, /*tp_is_gc*/
35892  0, /*tp_bases*/
35893  0, /*tp_mro*/
35894  0, /*tp_cache*/
35895  0, /*tp_subclasses*/
35896  0, /*tp_weaklist*/
35897  0, /*tp_del*/
35898  0, /*tp_version_tag*/
35899  #if PY_VERSION_HEX >= 0x030400a1
35900  0, /*tp_finalize*/
35901  #endif
35902  #if PY_VERSION_HEX >= 0x030800b1
35903  0, /*tp_vectorcall*/
35904  #endif
35905  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
35906  0, /*tp_print*/
35907  #endif
35908 };
35909 
35910 static PyMethodDef __pyx_methods[] = {
35911  {"generateTetrahedralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35912  {"cmeshToolsComputeGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron, METH_O, 0},
35913  {"generateFromTriangleFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_11generateFromTriangleFiles, METH_VARARGS|METH_KEYWORDS, 0},
35914  {"writeTriangleFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_13writeTriangleFiles, METH_VARARGS|METH_KEYWORDS, 0},
35915  {"generateFromTetgenFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_15generateFromTetgenFiles, METH_VARARGS|METH_KEYWORDS, 0},
35916  {"generateFromTetgenFilesParallel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel, METH_VARARGS|METH_KEYWORDS, 0},
35917  {"writeTetgenFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_19writeTetgenFiles, METH_VARARGS|METH_KEYWORDS, 0},
35918  {"write3dmFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_21write3dmFiles, METH_VARARGS|METH_KEYWORDS, 0},
35919  {"write2dmFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_23write2dmFiles, METH_VARARGS|METH_KEYWORDS, 0},
35920  {"generateFromHexFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_25generateFromHexFile, METH_VARARGS|METH_KEYWORDS, 0},
35921  {"generateFrom3DMFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_27generateFrom3DMFile, METH_VARARGS|METH_KEYWORDS, 0},
35922  {"generateFrom2DMFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_29generateFrom2DMFile, METH_VARARGS|METH_KEYWORDS, 0},
35923  {"computeGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron, METH_O, 0},
35924  {"allocateGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron, METH_O, 0},
35925  {"allocateNodeAndElementNodeDataStructures", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures, METH_VARARGS|METH_KEYWORDS, 0},
35926  {"constructElementBoundaryElementsArray", (PyCFunction)__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray, METH_O, 0},
35927  {"generateTriangularMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35928  {"generateHexahedralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35929  {"generateQuadrilateralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35930  {"computeGeometricInfo_triangle", (PyCFunction)__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle, METH_O, 0},
35931  {"allocateGeometricInfo_triangle", (PyCFunction)__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle, METH_O, 0},
35932  {"generateEdgeMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35933  {"computeGeometricInfo_edge", (PyCFunction)__pyx_pw_10cmeshTools_51computeGeometricInfo_edge, METH_O, 0},
35934  {"allocateGeometricInfo_edge", (PyCFunction)__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge, METH_O, 0},
35935  {"computeGeometricInfo_hexahedron", (PyCFunction)__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron, METH_O, 0},
35936  {"computeGeometricInfo_quadrilateral", (PyCFunction)__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral, METH_O, 0},
35937  {"allocateGeometricInfo_hexahedron", (PyCFunction)__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron, METH_O, 0},
35938  {"allocateGeometricInfo_quadrilateral", (PyCFunction)__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral, METH_O, 0},
35939  {"computeGeometricInfo_NURBS", (PyCFunction)__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS, METH_O, 0},
35940  {"allocateGeometricInfo_NURBS", (PyCFunction)__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS, METH_O, 0},
35941  {0, 0, 0, 0}
35942 };
35943 
35944 #if PY_MAJOR_VERSION >= 3
35945 #if CYTHON_PEP489_MULTI_PHASE_INIT
35946 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
35947 static int __pyx_pymod_exec_cmeshTools(PyObject* module); /*proto*/
35948 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
35949  {Py_mod_create, (void*)__pyx_pymod_create},
35950  {Py_mod_exec, (void*)__pyx_pymod_exec_cmeshTools},
35951  {0, NULL}
35952 };
35953 #endif
35954 
35955 static struct PyModuleDef __pyx_moduledef = {
35956  PyModuleDef_HEAD_INIT,
35957  "cmeshTools",
35958  0, /* m_doc */
35959  #if CYTHON_PEP489_MULTI_PHASE_INIT
35960  0, /* m_size */
35961  #else
35962  -1, /* m_size */
35963  #endif
35964  __pyx_methods /* m_methods */,
35965  #if CYTHON_PEP489_MULTI_PHASE_INIT
35966  __pyx_moduledef_slots, /* m_slots */
35967  #else
35968  NULL, /* m_reload */
35969  #endif
35970  NULL, /* m_traverse */
35971  NULL, /* m_clear */
35972  NULL /* m_free */
35973 };
35974 #endif
35975 #ifndef CYTHON_SMALL_CODE
35976 #if defined(__clang__)
35977  #define CYTHON_SMALL_CODE
35978 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
35979  #define CYTHON_SMALL_CODE __attribute__((cold))
35980 #else
35981  #define CYTHON_SMALL_CODE
35982 #endif
35983 #endif
35984 
35985 static __Pyx_StringTabEntry __pyx_string_tab[] = {
35986  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
35987  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
35988  {&__pyx_n_s_CMesh, __pyx_k_CMesh, sizeof(__pyx_k_CMesh), 0, 0, 1, 1},
35989  {&__pyx_n_s_CMultilevelMesh, __pyx_k_CMultilevelMesh, sizeof(__pyx_k_CMultilevelMesh), 0, 0, 1, 1},
35990  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
35991  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
35992  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
35993  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
35994  {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1},
35995  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
35996  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
35997  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
35998  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
35999  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
36000  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0},
36001  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
36002  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
36003  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
36004  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
36005  {&__pyx_n_s_Lx, __pyx_k_Lx, sizeof(__pyx_k_Lx), 0, 0, 1, 1},
36006  {&__pyx_n_s_Ly, __pyx_k_Ly, sizeof(__pyx_k_Ly), 0, 0, 1, 1},
36007  {&__pyx_n_s_Lz, __pyx_k_Lz, sizeof(__pyx_k_Lz), 0, 0, 1, 1},
36008  {&__pyx_n_s_MPI, __pyx_k_MPI, sizeof(__pyx_k_MPI), 0, 0, 1, 1},
36009  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
36010  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
36011  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
36012  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
36013  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
36014  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
36015  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
36016  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
36017  {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0},
36018  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
36019  {&__pyx_n_s_U_KNOT, __pyx_k_U_KNOT, sizeof(__pyx_k_U_KNOT), 0, 0, 1, 1},
36020  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
36021  {&__pyx_n_s_V_KNOT, __pyx_k_V_KNOT, sizeof(__pyx_k_V_KNOT), 0, 0, 1, 1},
36022  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
36023  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
36024  {&__pyx_n_s_W_KNOT, __pyx_k_W_KNOT, sizeof(__pyx_k_W_KNOT), 0, 0, 1, 1},
36025  {&__pyx_kp_b__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 0, 0},
36026  {&__pyx_kp_b__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 0, 0},
36027  {&__pyx_kp_b__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 0, 0},
36028  {&__pyx_kp_b__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 0, 0},
36029  {&__pyx_kp_u__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 1, 0, 0},
36030  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
36031  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
36032  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
36033  {&__pyx_n_s_buildPythonMeshInterface, __pyx_k_buildPythonMeshInterface, sizeof(__pyx_k_buildPythonMeshInterface), 0, 0, 1, 1},
36034  {&__pyx_n_s_buildPythonMeshInterfaceNoArrays, __pyx_k_buildPythonMeshInterfaceNoArrays, sizeof(__pyx_k_buildPythonMeshInterfaceNoArrays), 0, 0, 1, 1},
36035  {&__pyx_n_s_buildPythonMultilevelMeshInterfa, __pyx_k_buildPythonMultilevelMeshInterfa, sizeof(__pyx_k_buildPythonMultilevelMeshInterfa), 0, 0, 1, 1},
36036  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
36037  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
36038  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
36039  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
36040  {&__pyx_n_s_cmesh, __pyx_k_cmesh, sizeof(__pyx_k_cmesh), 0, 0, 1, 1},
36041  {&__pyx_n_s_cmeshList, __pyx_k_cmeshList, sizeof(__pyx_k_cmeshList), 0, 0, 1, 1},
36042  {&__pyx_n_s_cmeshTools, __pyx_k_cmeshTools, sizeof(__pyx_k_cmeshTools), 0, 0, 1, 1},
36043  {&__pyx_n_s_cmultilevelMesh, __pyx_k_cmultilevelMesh, sizeof(__pyx_k_cmultilevelMesh), 0, 0, 1, 1},
36044  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
36045  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
36046  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
36047  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
36048  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
36049  {&__pyx_n_s_edgeNodesArray, __pyx_k_edgeNodesArray, sizeof(__pyx_k_edgeNodesArray), 0, 0, 1, 1},
36050  {&__pyx_n_s_elementBarycentersArray, __pyx_k_elementBarycentersArray, sizeof(__pyx_k_elementBarycentersArray), 0, 0, 1, 1},
36051  {&__pyx_n_s_elementBoundariesArray, __pyx_k_elementBoundariesArray, sizeof(__pyx_k_elementBoundariesArray), 0, 0, 1, 1},
36052  {&__pyx_n_s_elementBoundaryBarycentersArray, __pyx_k_elementBoundaryBarycentersArray, sizeof(__pyx_k_elementBoundaryBarycentersArray), 0, 0, 1, 1},
36053  {&__pyx_n_s_elementBoundaryDiametersArray, __pyx_k_elementBoundaryDiametersArray, sizeof(__pyx_k_elementBoundaryDiametersArray), 0, 0, 1, 1},
36054  {&__pyx_n_s_elementBoundaryElementsArray, __pyx_k_elementBoundaryElementsArray, sizeof(__pyx_k_elementBoundaryElementsArray), 0, 0, 1, 1},
36055  {&__pyx_n_s_elementBoundaryLocalElementBound, __pyx_k_elementBoundaryLocalElementBound, sizeof(__pyx_k_elementBoundaryLocalElementBound), 0, 0, 1, 1},
36056  {&__pyx_n_s_elementBoundaryMaterialTypes, __pyx_k_elementBoundaryMaterialTypes, sizeof(__pyx_k_elementBoundaryMaterialTypes), 0, 0, 1, 1},
36057  {&__pyx_n_s_elementBoundaryNodesArray, __pyx_k_elementBoundaryNodesArray, sizeof(__pyx_k_elementBoundaryNodesArray), 0, 0, 1, 1},
36058  {&__pyx_n_s_elementChildrenArrayList, __pyx_k_elementChildrenArrayList, sizeof(__pyx_k_elementChildrenArrayList), 0, 0, 1, 1},
36059  {&__pyx_n_s_elementChildrenOffsetsList, __pyx_k_elementChildrenOffsetsList, sizeof(__pyx_k_elementChildrenOffsetsList), 0, 0, 1, 1},
36060  {&__pyx_n_s_elementDiametersArray, __pyx_k_elementDiametersArray, sizeof(__pyx_k_elementDiametersArray), 0, 0, 1, 1},
36061  {&__pyx_n_s_elementIJK, __pyx_k_elementIJK, sizeof(__pyx_k_elementIJK), 0, 0, 1, 1},
36062  {&__pyx_n_s_elementInnerDiametersArray, __pyx_k_elementInnerDiametersArray, sizeof(__pyx_k_elementInnerDiametersArray), 0, 0, 1, 1},
36063  {&__pyx_n_s_elementMaterialTypes, __pyx_k_elementMaterialTypes, sizeof(__pyx_k_elementMaterialTypes), 0, 0, 1, 1},
36064  {&__pyx_n_s_elementNeighborsArray, __pyx_k_elementNeighborsArray, sizeof(__pyx_k_elementNeighborsArray), 0, 0, 1, 1},
36065  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
36066  {&__pyx_n_s_elementParentsArrayList, __pyx_k_elementParentsArrayList, sizeof(__pyx_k_elementParentsArrayList), 0, 0, 1, 1},
36067  {&__pyx_n_s_elementTagArray, __pyx_k_elementTagArray, sizeof(__pyx_k_elementTagArray), 0, 0, 1, 1},
36068  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
36069  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
36070  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
36071  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
36072  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
36073  {&__pyx_n_s_exteriorElementBoundariesArray, __pyx_k_exteriorElementBoundariesArray, sizeof(__pyx_k_exteriorElementBoundariesArray), 0, 0, 1, 1},
36074  {&__pyx_n_s_failed, __pyx_k_failed, sizeof(__pyx_k_failed), 0, 0, 1, 1},
36075  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
36076  {&__pyx_n_s_filebase, __pyx_k_filebase, sizeof(__pyx_k_filebase), 0, 0, 1, 1},
36077  {&__pyx_n_s_finestLevel, __pyx_k_finestLevel, sizeof(__pyx_k_finestLevel), 0, 0, 1, 1},
36078  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
36079  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
36080  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
36081  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
36082  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
36083  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
36084  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
36085  {&__pyx_n_s_hMin, __pyx_k_hMin, sizeof(__pyx_k_hMin), 0, 0, 1, 1},
36086  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
36087  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
36088  {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
36089  {&__pyx_n_s_interiorElementBoundariesArray, __pyx_k_interiorElementBoundariesArray, sizeof(__pyx_k_interiorElementBoundariesArray), 0, 0, 1, 1},
36090  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
36091  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
36092  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
36093  {&__pyx_n_s_locallyRefineMultilevelMesh, __pyx_k_locallyRefineMultilevelMesh, sizeof(__pyx_k_locallyRefineMultilevelMesh), 0, 0, 1, 1},
36094  {&__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp, __pyx_k_locallyRefine_nSpace_0_d_not_imp, sizeof(__pyx_k_locallyRefine_nSpace_0_d_not_imp), 0, 0, 1, 0},
36095  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
36096  {&__pyx_n_s_max_nElements_node, __pyx_k_max_nElements_node, sizeof(__pyx_k_max_nElements_node), 0, 0, 1, 1},
36097  {&__pyx_n_s_max_nNodeNeighbors_node, __pyx_k_max_nNodeNeighbors_node, sizeof(__pyx_k_max_nNodeNeighbors_node), 0, 0, 1, 1},
36098  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
36099  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
36100  {&__pyx_n_s_mpi4py, __pyx_k_mpi4py, sizeof(__pyx_k_mpi4py), 0, 0, 1, 1},
36101  {&__pyx_n_s_nEdges_global, __pyx_k_nEdges_global, sizeof(__pyx_k_nEdges_global), 0, 0, 1, 1},
36102  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
36103  {&__pyx_n_s_nElementBoundaries_global, __pyx_k_nElementBoundaries_global, sizeof(__pyx_k_nElementBoundaries_global), 0, 0, 1, 1},
36104  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
36105  {&__pyx_n_s_nExteriorElementBoundaries_globa, __pyx_k_nExteriorElementBoundaries_globa, sizeof(__pyx_k_nExteriorElementBoundaries_globa), 0, 0, 1, 1},
36106  {&__pyx_n_s_nInteriorElementBoundaries_globa, __pyx_k_nInteriorElementBoundaries_globa, sizeof(__pyx_k_nInteriorElementBoundaries_globa), 0, 0, 1, 1},
36107  {&__pyx_n_s_nLevels, __pyx_k_nLevels, sizeof(__pyx_k_nLevels), 0, 0, 1, 1},
36108  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
36109  {&__pyx_n_s_nNodes_elementBoundary, __pyx_k_nNodes_elementBoundary, sizeof(__pyx_k_nNodes_elementBoundary), 0, 0, 1, 1},
36110  {&__pyx_n_s_nNodes_global, __pyx_k_nNodes_global, sizeof(__pyx_k_nNodes_global), 0, 0, 1, 1},
36111  {&__pyx_n_s_nSpace, __pyx_k_nSpace, sizeof(__pyx_k_nSpace), 0, 0, 1, 1},
36112  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
36113  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
36114  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
36115  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
36116  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
36117  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
36118  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
36119  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
36120  {&__pyx_n_s_nodeDiametersArray, __pyx_k_nodeDiametersArray, sizeof(__pyx_k_nodeDiametersArray), 0, 0, 1, 1},
36121  {&__pyx_n_s_nodeElementOffsets, __pyx_k_nodeElementOffsets, sizeof(__pyx_k_nodeElementOffsets), 0, 0, 1, 1},
36122  {&__pyx_n_s_nodeElementsArray, __pyx_k_nodeElementsArray, sizeof(__pyx_k_nodeElementsArray), 0, 0, 1, 1},
36123  {&__pyx_n_s_nodeMaterialTypes, __pyx_k_nodeMaterialTypes, sizeof(__pyx_k_nodeMaterialTypes), 0, 0, 1, 1},
36124  {&__pyx_n_s_nodeStarArray, __pyx_k_nodeStarArray, sizeof(__pyx_k_nodeStarArray), 0, 0, 1, 1},
36125  {&__pyx_n_s_nodeStarOffsets, __pyx_k_nodeStarOffsets, sizeof(__pyx_k_nodeStarOffsets), 0, 0, 1, 1},
36126  {&__pyx_n_s_nodeSupportArray, __pyx_k_nodeSupportArray, sizeof(__pyx_k_nodeSupportArray), 0, 0, 1, 1},
36127  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
36128  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
36129  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
36130  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
36131  {&__pyx_n_s_nx, __pyx_k_nx, sizeof(__pyx_k_nx), 0, 0, 1, 1},
36132  {&__pyx_n_s_ny, __pyx_k_ny, sizeof(__pyx_k_ny), 0, 0, 1, 1},
36133  {&__pyx_n_s_nz, __pyx_k_nz, sizeof(__pyx_k_nz), 0, 0, 1, 1},
36134  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
36135  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
36136  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
36137  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
36138  {&__pyx_n_s_proteus, __pyx_k_proteus, sizeof(__pyx_k_proteus), 0, 0, 1, 1},
36139  {&__pyx_kp_s_proteus_cmeshTools_pyx, __pyx_k_proteus_cmeshTools_pyx, sizeof(__pyx_k_proteus_cmeshTools_pyx), 0, 0, 1, 0},
36140  {&__pyx_n_s_px, __pyx_k_px, sizeof(__pyx_k_px), 0, 0, 1, 1},
36141  {&__pyx_n_s_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 0, 1, 1},
36142  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
36143  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
36144  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
36145  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
36146  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
36147  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
36148  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
36149  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
36150  {&__pyx_n_s_pz, __pyx_k_pz, sizeof(__pyx_k_pz), 0, 0, 1, 1},
36151  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
36152  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
36153  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
36154  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
36155  {&__pyx_n_s_refineTypeFlag, __pyx_k_refineTypeFlag, sizeof(__pyx_k_refineTypeFlag), 0, 0, 1, 1},
36156  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
36157  {&__pyx_kp_s_self_mesh_cannot_be_converted_to, __pyx_k_self_mesh_cannot_be_converted_to, sizeof(__pyx_k_self_mesh_cannot_be_converted_to), 0, 0, 1, 0},
36158  {&__pyx_kp_s_self_multilevelMesh_cannot_be_co, __pyx_k_self_multilevelMesh_cannot_be_co, sizeof(__pyx_k_self_multilevelMesh_cannot_be_co), 0, 0, 1, 0},
36159  {&__pyx_n_s_setNewestNodeBases, __pyx_k_setNewestNodeBases, sizeof(__pyx_k_setNewestNodeBases), 0, 0, 1, 1},
36160  {&__pyx_kp_s_setNewestNodeBases_0_d_not_imple, __pyx_k_setNewestNodeBases_0_d_not_imple, sizeof(__pyx_k_setNewestNodeBases_0_d_not_imple), 0, 0, 1, 0},
36161  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
36162  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
36163  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
36164  {&__pyx_n_s_sigmaMax, __pyx_k_sigmaMax, sizeof(__pyx_k_sigmaMax), 0, 0, 1, 1},
36165  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
36166  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
36167  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
36168  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
36169  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
36170  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
36171  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
36172  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
36173  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
36174  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
36175  {&__pyx_n_s_triangleFlag, __pyx_k_triangleFlag, sizeof(__pyx_k_triangleFlag), 0, 0, 1, 1},
36176  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
36177  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
36178  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
36179  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
36180  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
36181  {&__pyx_n_s_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 0, 1, 1},
36182  {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
36183  {&__pyx_kp_s_wrong_nLevels, __pyx_k_wrong_nLevels, sizeof(__pyx_k_wrong_nLevels), 0, 0, 1, 0},
36184  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
36185  {0, 0, 0, 0, 0, 0, 0}
36186 };
36187 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
36188  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
36189  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 214, __pyx_L1_error)
36190  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(3, 272, __pyx_L1_error)
36191  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 856, __pyx_L1_error)
36192  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 1038, __pyx_L1_error)
36193  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 148, __pyx_L1_error)
36194  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 151, __pyx_L1_error)
36195  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 404, __pyx_L1_error)
36196  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 613, __pyx_L1_error)
36197  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 832, __pyx_L1_error)
36198  return 0;
36199  __pyx_L1_error:;
36200  return -1;
36201 }
36202 
36203 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
36204  __Pyx_RefNannyDeclarations
36205  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
36206 
36207  /* "cmeshTools.pyx":34
36208  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
36209  * else:
36210  * self.nodeElementsArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
36211  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
36212  *
36213  */
36214  __pyx_tuple_ = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 34, __pyx_L1_error)
36215  __Pyx_GOTREF(__pyx_tuple_);
36216  __Pyx_GIVEREF(__pyx_tuple_);
36217 
36218  /* "(tree fragment)":2
36219  * def __reduce_cython__(self):
36220  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36221  * def __setstate_cython__(self, __pyx_state):
36222  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
36223  */
36224  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_mesh_cannot_be_converted_to); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 2, __pyx_L1_error)
36225  __Pyx_GOTREF(__pyx_tuple__2);
36226  __Pyx_GIVEREF(__pyx_tuple__2);
36227 
36228  /* "(tree fragment)":4
36229  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
36230  * def __setstate_cython__(self, __pyx_state):
36231  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36232  */
36233  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_mesh_cannot_be_converted_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 4, __pyx_L1_error)
36234  __Pyx_GOTREF(__pyx_tuple__3);
36235  __Pyx_GIVEREF(__pyx_tuple__3);
36236 
36237  /* "(tree fragment)":2
36238  * def __reduce_cython__(self):
36239  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36240  * def __setstate_cython__(self, __pyx_state):
36241  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
36242  */
36243  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_self_multilevelMesh_cannot_be_co); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 2, __pyx_L1_error)
36244  __Pyx_GOTREF(__pyx_tuple__4);
36245  __Pyx_GIVEREF(__pyx_tuple__4);
36246 
36247  /* "(tree fragment)":4
36248  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
36249  * def __setstate_cython__(self, __pyx_state):
36250  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36251  */
36252  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_multilevelMesh_cannot_be_co); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 4, __pyx_L1_error)
36253  __Pyx_GOTREF(__pyx_tuple__5);
36254  __Pyx_GIVEREF(__pyx_tuple__5);
36255 
36256  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
36257  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
36258  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
36259  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
36260  *
36261  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
36262  */
36263  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(3, 272, __pyx_L1_error)
36264  __Pyx_GOTREF(__pyx_tuple__6);
36265  __Pyx_GIVEREF(__pyx_tuple__6);
36266 
36267  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
36268  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
36269  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
36270  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
36271  *
36272  * info.buf = PyArray_DATA(self)
36273  */
36274  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(3, 276, __pyx_L1_error)
36275  __Pyx_GOTREF(__pyx_tuple__7);
36276  __Pyx_GIVEREF(__pyx_tuple__7);
36277 
36278  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
36279  * if ((descr.byteorder == c'>' and little_endian) or
36280  * (descr.byteorder == c'<' and not little_endian)):
36281  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
36282  * if t == NPY_BYTE: f = "b"
36283  * elif t == NPY_UBYTE: f = "B"
36284  */
36285  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(3, 306, __pyx_L1_error)
36286  __Pyx_GOTREF(__pyx_tuple__8);
36287  __Pyx_GIVEREF(__pyx_tuple__8);
36288 
36289  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
36290  *
36291  * if (end - f) - <int>(new_offset - offset[0]) < 15:
36292  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
36293  *
36294  * if ((child.byteorder == c'>' and little_endian) or
36295  */
36296  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(3, 856, __pyx_L1_error)
36297  __Pyx_GOTREF(__pyx_tuple__9);
36298  __Pyx_GIVEREF(__pyx_tuple__9);
36299 
36300  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
36301  * t = child.type_num
36302  * if end - f < 5:
36303  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
36304  *
36305  * # Until ticket #99 is fixed, use integers to avoid warnings
36306  */
36307  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(3, 880, __pyx_L1_error)
36308  __Pyx_GOTREF(__pyx_tuple__10);
36309  __Pyx_GIVEREF(__pyx_tuple__10);
36310 
36311  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
36312  * _import_array()
36313  * except Exception:
36314  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
36315  *
36316  * cdef inline int import_umath() except -1:
36317  */
36318  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(3, 1038, __pyx_L1_error)
36319  __Pyx_GOTREF(__pyx_tuple__11);
36320  __Pyx_GIVEREF(__pyx_tuple__11);
36321 
36322  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
36323  * _import_umath()
36324  * except Exception:
36325  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
36326  *
36327  * cdef inline int import_ufunc() except -1:
36328  */
36329  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(3, 1044, __pyx_L1_error)
36330  __Pyx_GOTREF(__pyx_tuple__12);
36331  __Pyx_GIVEREF(__pyx_tuple__12);
36332 
36333  /* "View.MemoryView":133
36334  *
36335  * if not self.ndim:
36336  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
36337  *
36338  * if itemsize <= 0:
36339  */
36340  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 133, __pyx_L1_error)
36341  __Pyx_GOTREF(__pyx_tuple__13);
36342  __Pyx_GIVEREF(__pyx_tuple__13);
36343 
36344  /* "View.MemoryView":136
36345  *
36346  * if itemsize <= 0:
36347  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
36348  *
36349  * if not isinstance(format, bytes):
36350  */
36351  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 136, __pyx_L1_error)
36352  __Pyx_GOTREF(__pyx_tuple__14);
36353  __Pyx_GIVEREF(__pyx_tuple__14);
36354 
36355  /* "View.MemoryView":148
36356  *
36357  * if not self._shape:
36358  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
36359  *
36360  *
36361  */
36362  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 148, __pyx_L1_error)
36363  __Pyx_GOTREF(__pyx_tuple__15);
36364  __Pyx_GIVEREF(__pyx_tuple__15);
36365 
36366  /* "View.MemoryView":176
36367  * self.data = <char *>malloc(self.len)
36368  * if not self.data:
36369  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
36370  *
36371  * if self.dtype_is_object:
36372  */
36373  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 176, __pyx_L1_error)
36374  __Pyx_GOTREF(__pyx_tuple__16);
36375  __Pyx_GIVEREF(__pyx_tuple__16);
36376 
36377  /* "View.MemoryView":192
36378  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
36379  * if not (flags & bufmode):
36380  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
36381  * info.buf = self.data
36382  * info.len = self.len
36383  */
36384  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 192, __pyx_L1_error)
36385  __Pyx_GOTREF(__pyx_tuple__17);
36386  __Pyx_GIVEREF(__pyx_tuple__17);
36387 
36388  /* "(tree fragment)":2
36389  * def __reduce_cython__(self):
36390  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36391  * def __setstate_cython__(self, __pyx_state):
36392  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36393  */
36394  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 2, __pyx_L1_error)
36395  __Pyx_GOTREF(__pyx_tuple__18);
36396  __Pyx_GIVEREF(__pyx_tuple__18);
36397 
36398  /* "(tree fragment)":4
36399  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36400  * def __setstate_cython__(self, __pyx_state):
36401  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36402  */
36403  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 4, __pyx_L1_error)
36404  __Pyx_GOTREF(__pyx_tuple__19);
36405  __Pyx_GIVEREF(__pyx_tuple__19);
36406 
36407  /* "View.MemoryView":418
36408  * def __setitem__(memoryview self, object index, object value):
36409  * if self.view.readonly:
36410  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
36411  *
36412  * have_slices, index = _unellipsify(index, self.view.ndim)
36413  */
36414  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 418, __pyx_L1_error)
36415  __Pyx_GOTREF(__pyx_tuple__20);
36416  __Pyx_GIVEREF(__pyx_tuple__20);
36417 
36418  /* "View.MemoryView":495
36419  * result = struct.unpack(self.view.format, bytesitem)
36420  * except struct.error:
36421  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
36422  * else:
36423  * if len(self.view.format) == 1:
36424  */
36425  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 495, __pyx_L1_error)
36426  __Pyx_GOTREF(__pyx_tuple__21);
36427  __Pyx_GIVEREF(__pyx_tuple__21);
36428 
36429  /* "View.MemoryView":520
36430  * def __getbuffer__(self, Py_buffer *info, int flags):
36431  * if flags & PyBUF_WRITABLE and self.view.readonly:
36432  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
36433  *
36434  * if flags & PyBUF_ND:
36435  */
36436  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 520, __pyx_L1_error)
36437  __Pyx_GOTREF(__pyx_tuple__22);
36438  __Pyx_GIVEREF(__pyx_tuple__22);
36439 
36440  /* "View.MemoryView":570
36441  * if self.view.strides == NULL:
36442  *
36443  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
36444  *
36445  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
36446  */
36447  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 570, __pyx_L1_error)
36448  __Pyx_GOTREF(__pyx_tuple__23);
36449  __Pyx_GIVEREF(__pyx_tuple__23);
36450 
36451  /* "View.MemoryView":577
36452  * def suboffsets(self):
36453  * if self.view.suboffsets == NULL:
36454  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
36455  *
36456  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
36457  */
36458  __pyx_tuple__24 = PyTuple_New(1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 577, __pyx_L1_error)
36459  __Pyx_GOTREF(__pyx_tuple__24);
36460  __Pyx_INCREF(__pyx_int_neg_1);
36461  __Pyx_GIVEREF(__pyx_int_neg_1);
36462  PyTuple_SET_ITEM(__pyx_tuple__24, 0, __pyx_int_neg_1);
36463  __Pyx_GIVEREF(__pyx_tuple__24);
36464 
36465  /* "(tree fragment)":2
36466  * def __reduce_cython__(self):
36467  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36468  * def __setstate_cython__(self, __pyx_state):
36469  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36470  */
36471  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 2, __pyx_L1_error)
36472  __Pyx_GOTREF(__pyx_tuple__25);
36473  __Pyx_GIVEREF(__pyx_tuple__25);
36474 
36475  /* "(tree fragment)":4
36476  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36477  * def __setstate_cython__(self, __pyx_state):
36478  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36479  */
36480  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 4, __pyx_L1_error)
36481  __Pyx_GOTREF(__pyx_tuple__26);
36482  __Pyx_GIVEREF(__pyx_tuple__26);
36483 
36484  /* "View.MemoryView":682
36485  * if item is Ellipsis:
36486  * if not seen_ellipsis:
36487  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
36488  * seen_ellipsis = True
36489  * else:
36490  */
36491  __pyx_slice__27 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 682, __pyx_L1_error)
36492  __Pyx_GOTREF(__pyx_slice__27);
36493  __Pyx_GIVEREF(__pyx_slice__27);
36494 
36495  /* "View.MemoryView":703
36496  * for suboffset in suboffsets[:ndim]:
36497  * if suboffset >= 0:
36498  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
36499  *
36500  *
36501  */
36502  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 703, __pyx_L1_error)
36503  __Pyx_GOTREF(__pyx_tuple__28);
36504  __Pyx_GIVEREF(__pyx_tuple__28);
36505 
36506  /* "(tree fragment)":2
36507  * def __reduce_cython__(self):
36508  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36509  * def __setstate_cython__(self, __pyx_state):
36510  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36511  */
36512  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2, __pyx_L1_error)
36513  __Pyx_GOTREF(__pyx_tuple__29);
36514  __Pyx_GIVEREF(__pyx_tuple__29);
36515 
36516  /* "(tree fragment)":4
36517  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36518  * def __setstate_cython__(self, __pyx_state):
36519  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36520  */
36521  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 4, __pyx_L1_error)
36522  __Pyx_GOTREF(__pyx_tuple__30);
36523  __Pyx_GIVEREF(__pyx_tuple__30);
36524 
36525  /* "cmeshTools.pyx":117
36526  * self.volume = self.mesh.volume
36527  *
36528  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
36529  * """
36530  * function to be conform to old module, and to calls from MeshTools
36531  */
36532  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_cmesh); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 117, __pyx_L1_error)
36533  __Pyx_GOTREF(__pyx_tuple__36);
36534  __Pyx_GIVEREF(__pyx_tuple__36);
36535  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMeshInterface, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 117, __pyx_L1_error)
36536 
36537  /* "cmeshTools.pyx":173
36538  * cmesh.volume)
36539  *
36540  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
36541  * """
36542  * function to be conform to old module, and to calls from MeshTools
36543  */
36544  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_cmesh); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 173, __pyx_L1_error)
36545  __Pyx_GOTREF(__pyx_tuple__38);
36546  __Pyx_GIVEREF(__pyx_tuple__38);
36547  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMeshInterfaceNoArrays, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(1, 173, __pyx_L1_error)
36548 
36549  /* "cmeshTools.pyx":297
36550  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
36551  *
36552  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
36553  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
36554  * return (cmultilevelMesh.nLevels,
36555  */
36556  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_n_s_cmultilevelMesh); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 297, __pyx_L1_error)
36557  __Pyx_GOTREF(__pyx_tuple__40);
36558  __Pyx_GIVEREF(__pyx_tuple__40);
36559  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMultilevelMeshInterfa, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(1, 297, __pyx_L1_error)
36560 
36561  /* "cmeshTools.pyx":491
36562  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
36563  *
36564  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
36565  * CMultilevelMesh cmultilevelMesh,
36566  * np.ndarray elementTagArray,
36567  */
36568  __pyx_tuple__42 = PyTuple_Pack(6, __pyx_n_s_nSpace, __pyx_n_s_cmultilevelMesh, __pyx_n_s_elementTagArray, __pyx_n_s_refineTypeFlag, __pyx_n_s_failed, __pyx_n_s_finestLevel); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 491, __pyx_L1_error)
36569  __Pyx_GOTREF(__pyx_tuple__42);
36570  __Pyx_GIVEREF(__pyx_tuple__42);
36571  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_locallyRefineMultilevelMesh, 491, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 491, __pyx_L1_error)
36572 
36573  /* "cmeshTools.pyx":529
36574  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
36575  *
36576  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
36577  * if nSpace == 2:
36578  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
36579  */
36580  __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_nSpace, __pyx_n_s_cmultilevelMesh, __pyx_n_s_failed); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 529, __pyx_L1_error)
36581  __Pyx_GOTREF(__pyx_tuple__44);
36582  __Pyx_GIVEREF(__pyx_tuple__44);
36583  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_setNewestNodeBases, 529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 529, __pyx_L1_error)
36584 
36585  /* "View.MemoryView":286
36586  * return self.name
36587  *
36588  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
36589  * cdef strided = Enum("<strided and direct>") # default
36590  * cdef indirect = Enum("<strided and indirect>")
36591  */
36592  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 286, __pyx_L1_error)
36593  __Pyx_GOTREF(__pyx_tuple__46);
36594  __Pyx_GIVEREF(__pyx_tuple__46);
36595 
36596  /* "View.MemoryView":287
36597  *
36598  * cdef generic = Enum("<strided and direct or indirect>")
36599  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
36600  * cdef indirect = Enum("<strided and indirect>")
36601  *
36602  */
36603  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 287, __pyx_L1_error)
36604  __Pyx_GOTREF(__pyx_tuple__47);
36605  __Pyx_GIVEREF(__pyx_tuple__47);
36606 
36607  /* "View.MemoryView":288
36608  * cdef generic = Enum("<strided and direct or indirect>")
36609  * cdef strided = Enum("<strided and direct>") # default
36610  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
36611  *
36612  *
36613  */
36614  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 288, __pyx_L1_error)
36615  __Pyx_GOTREF(__pyx_tuple__48);
36616  __Pyx_GIVEREF(__pyx_tuple__48);
36617 
36618  /* "View.MemoryView":291
36619  *
36620  *
36621  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
36622  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
36623  *
36624  */
36625  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 291, __pyx_L1_error)
36626  __Pyx_GOTREF(__pyx_tuple__49);
36627  __Pyx_GIVEREF(__pyx_tuple__49);
36628 
36629  /* "View.MemoryView":292
36630  *
36631  * cdef contiguous = Enum("<contiguous and direct>")
36632  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
36633  *
36634  *
36635  */
36636  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 292, __pyx_L1_error)
36637  __Pyx_GOTREF(__pyx_tuple__50);
36638  __Pyx_GIVEREF(__pyx_tuple__50);
36639 
36640  /* "(tree fragment)":1
36641  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
36642  * cdef object __pyx_PickleError
36643  * cdef object __pyx_result
36644  */
36645  __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1, __pyx_L1_error)
36646  __Pyx_GOTREF(__pyx_tuple__51);
36647  __Pyx_GIVEREF(__pyx_tuple__51);
36648  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 1, __pyx_L1_error)
36649  __Pyx_RefNannyFinishContext();
36650  return 0;
36651  __pyx_L1_error:;
36652  __Pyx_RefNannyFinishContext();
36653  return -1;
36654 }
36655 
36656 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
36657  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
36658  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
36659  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
36660  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(1, 1, __pyx_L1_error)
36661  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error)
36662  return 0;
36663  __pyx_L1_error:;
36664  return -1;
36665 }
36666 
36667 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
36668 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
36669 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
36670 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
36671 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
36672 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
36673 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
36674 
36675 static int __Pyx_modinit_global_init_code(void) {
36676  __Pyx_RefNannyDeclarations
36677  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
36678  /*--- Global init code ---*/
36679  generic = Py_None; Py_INCREF(Py_None);
36680  strided = Py_None; Py_INCREF(Py_None);
36681  indirect = Py_None; Py_INCREF(Py_None);
36682  contiguous = Py_None; Py_INCREF(Py_None);
36683  indirect_contiguous = Py_None; Py_INCREF(Py_None);
36684  __Pyx_RefNannyFinishContext();
36685  return 0;
36686 }
36687 
36688 static int __Pyx_modinit_variable_export_code(void) {
36689  __Pyx_RefNannyDeclarations
36690  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
36691  /*--- Variable export code ---*/
36692  __Pyx_RefNannyFinishContext();
36693  return 0;
36694 }
36695 
36696 static int __Pyx_modinit_function_export_code(void) {
36697  __Pyx_RefNannyDeclarations
36698  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
36699  /*--- Function export code ---*/
36700  __Pyx_RefNannyFinishContext();
36701  return 0;
36702 }
36703 
36704 static int __Pyx_modinit_type_init_code(void) {
36705  __Pyx_RefNannyDeclarations
36706  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
36707  /*--- Type init code ---*/
36708  if (PyType_Ready(&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36709  #if PY_VERSION_HEX < 0x030800B1
36710  __pyx_type_10cmeshTools_CMesh.tp_print = 0;
36711  #endif
36712  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10cmeshTools_CMesh.tp_dictoffset && __pyx_type_10cmeshTools_CMesh.tp_getattro == PyObject_GenericGetAttr)) {
36713  __pyx_type_10cmeshTools_CMesh.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36714  }
36715  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CMesh, (PyObject *)&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36716  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36717  __pyx_ptype_10cmeshTools_CMesh = &__pyx_type_10cmeshTools_CMesh;
36718  if (PyType_Ready(&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 199, __pyx_L1_error)
36719  #if PY_VERSION_HEX < 0x030800B1
36720  __pyx_type_10cmeshTools_CMultilevelMesh.tp_print = 0;
36721  #endif
36722  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10cmeshTools_CMultilevelMesh.tp_dictoffset && __pyx_type_10cmeshTools_CMultilevelMesh.tp_getattro == PyObject_GenericGetAttr)) {
36723  __pyx_type_10cmeshTools_CMultilevelMesh.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36724  }
36725  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CMultilevelMesh, (PyObject *)&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 199, __pyx_L1_error)
36726  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 199, __pyx_L1_error)
36727  __pyx_ptype_10cmeshTools_CMultilevelMesh = &__pyx_type_10cmeshTools_CMultilevelMesh;
36728  __pyx_vtabptr_array = &__pyx_vtable_array;
36729  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
36730  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36731  #if PY_VERSION_HEX < 0x030800B1
36732  __pyx_type___pyx_array.tp_print = 0;
36733  #endif
36734  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36735  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36736  __pyx_array_type = &__pyx_type___pyx_array;
36737  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
36738  #if PY_VERSION_HEX < 0x030800B1
36739  __pyx_type___pyx_MemviewEnum.tp_print = 0;
36740  #endif
36741  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
36742  __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36743  }
36744  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
36745  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
36746  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
36747  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
36748  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
36749  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
36750  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
36751  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
36752  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
36753  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
36754  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36755  #if PY_VERSION_HEX < 0x030800B1
36756  __pyx_type___pyx_memoryview.tp_print = 0;
36757  #endif
36758  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
36759  __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36760  }
36761  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36762  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36763  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
36764  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
36765  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
36766  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
36767  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
36768  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
36769  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
36770  #if PY_VERSION_HEX < 0x030800B1
36771  __pyx_type___pyx_memoryviewslice.tp_print = 0;
36772  #endif
36773  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
36774  __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36775  }
36776  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
36777  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
36778  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
36779  __Pyx_RefNannyFinishContext();
36780  return 0;
36781  __pyx_L1_error:;
36782  __Pyx_RefNannyFinishContext();
36783  return -1;
36784 }
36785 
36786 static int __Pyx_modinit_type_import_code(void) {
36787  __Pyx_RefNannyDeclarations
36788  PyObject *__pyx_t_1 = NULL;
36789  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
36790  /*--- Type import code ---*/
36791  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
36792  __Pyx_GOTREF(__pyx_t_1);
36793  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
36794  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
36795  sizeof(PyTypeObject),
36796  #else
36797  sizeof(PyHeapTypeObject),
36798  #endif
36799  __Pyx_ImportType_CheckSize_Warn);
36800  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
36801  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36802  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 206, __pyx_L1_error)
36803  __Pyx_GOTREF(__pyx_t_1);
36804  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
36805  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 206, __pyx_L1_error)
36806  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
36807  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 229, __pyx_L1_error)
36808  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
36809  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 233, __pyx_L1_error)
36810  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
36811  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 242, __pyx_L1_error)
36812  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
36813  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 918, __pyx_L1_error)
36814  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36815  __Pyx_RefNannyFinishContext();
36816  return 0;
36817  __pyx_L1_error:;
36818  __Pyx_XDECREF(__pyx_t_1);
36819  __Pyx_RefNannyFinishContext();
36820  return -1;
36821 }
36822 
36823 static int __Pyx_modinit_variable_import_code(void) {
36824  __Pyx_RefNannyDeclarations
36825  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
36826  /*--- Variable import code ---*/
36827  __Pyx_RefNannyFinishContext();
36828  return 0;
36829 }
36830 
36831 static int __Pyx_modinit_function_import_code(void) {
36832  __Pyx_RefNannyDeclarations
36833  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
36834  /*--- Function import code ---*/
36835  __Pyx_RefNannyFinishContext();
36836  return 0;
36837 }
36838 
36839 
36840 #if PY_MAJOR_VERSION < 3
36841 #ifdef CYTHON_NO_PYINIT_EXPORT
36842 #define __Pyx_PyMODINIT_FUNC void
36843 #else
36844 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
36845 #endif
36846 #else
36847 #ifdef CYTHON_NO_PYINIT_EXPORT
36848 #define __Pyx_PyMODINIT_FUNC PyObject *
36849 #else
36850 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
36851 #endif
36852 #endif
36853 
36854 
36855 #if PY_MAJOR_VERSION < 3
36856 __Pyx_PyMODINIT_FUNC initcmeshTools(void) CYTHON_SMALL_CODE; /*proto*/
36857 __Pyx_PyMODINIT_FUNC initcmeshTools(void)
36858 #else
36859 __Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void) CYTHON_SMALL_CODE; /*proto*/
36860 __Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void)
36861 #if CYTHON_PEP489_MULTI_PHASE_INIT
36862 {
36863  return PyModuleDef_Init(&__pyx_moduledef);
36864 }
36865 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
36866  #if PY_VERSION_HEX >= 0x030700A1
36867  static PY_INT64_T main_interpreter_id = -1;
36868  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
36869  if (main_interpreter_id == -1) {
36870  main_interpreter_id = current_id;
36871  return (unlikely(current_id == -1)) ? -1 : 0;
36872  } else if (unlikely(main_interpreter_id != current_id))
36873  #else
36874  static PyInterpreterState *main_interpreter = NULL;
36875  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
36876  if (!main_interpreter) {
36877  main_interpreter = current_interpreter;
36878  } else if (unlikely(main_interpreter != current_interpreter))
36879  #endif
36880  {
36881  PyErr_SetString(
36882  PyExc_ImportError,
36883  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
36884  return -1;
36885  }
36886  return 0;
36887 }
36888 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
36889  PyObject *value = PyObject_GetAttrString(spec, from_name);
36890  int result = 0;
36891  if (likely(value)) {
36892  if (allow_none || value != Py_None) {
36893  result = PyDict_SetItemString(moddict, to_name, value);
36894  }
36895  Py_DECREF(value);
36896  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
36897  PyErr_Clear();
36898  } else {
36899  result = -1;
36900  }
36901  return result;
36902 }
36903 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
36904  PyObject *module = NULL, *moddict, *modname;
36905  if (__Pyx_check_single_interpreter())
36906  return NULL;
36907  if (__pyx_m)
36908  return __Pyx_NewRef(__pyx_m);
36909  modname = PyObject_GetAttrString(spec, "name");
36910  if (unlikely(!modname)) goto bad;
36911  module = PyModule_NewObject(modname);
36912  Py_DECREF(modname);
36913  if (unlikely(!module)) goto bad;
36914  moddict = PyModule_GetDict(module);
36915  if (unlikely(!moddict)) goto bad;
36916  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
36917  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
36918  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
36919  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
36920  return module;
36921 bad:
36922  Py_XDECREF(module);
36923  return NULL;
36924 }
36925 
36926 
36927 static CYTHON_SMALL_CODE int __pyx_pymod_exec_cmeshTools(PyObject *__pyx_pyinit_module)
36928 #endif
36929 #endif
36930 {
36931  PyObject *__pyx_t_1 = NULL;
36932  PyObject *__pyx_t_2 = NULL;
36933  static PyThread_type_lock __pyx_t_3[8];
36934  __Pyx_RefNannyDeclarations
36935  #if CYTHON_PEP489_MULTI_PHASE_INIT
36936  if (__pyx_m) {
36937  if (__pyx_m == __pyx_pyinit_module) return 0;
36938  PyErr_SetString(PyExc_RuntimeError, "Module 'cmeshTools' has already been imported. Re-initialisation is not supported.");
36939  return -1;
36940  }
36941  #elif PY_MAJOR_VERSION >= 3
36942  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
36943  #endif
36944  #if CYTHON_REFNANNY
36945 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
36946 if (!__Pyx_RefNanny) {
36947  PyErr_Clear();
36948  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
36949  if (!__Pyx_RefNanny)
36950  Py_FatalError("failed to import 'refnanny' module");
36951 }
36952 #endif
36953  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void)", 0);
36954  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36955  #ifdef __Pxy_PyFrame_Initialize_Offsets
36956  __Pxy_PyFrame_Initialize_Offsets();
36957  #endif
36958  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
36959  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
36960  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
36961  #ifdef __Pyx_CyFunction_USED
36962  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36963  #endif
36964  #ifdef __Pyx_FusedFunction_USED
36965  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36966  #endif
36967  #ifdef __Pyx_Coroutine_USED
36968  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36969  #endif
36970  #ifdef __Pyx_Generator_USED
36971  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36972  #endif
36973  #ifdef __Pyx_AsyncGen_USED
36974  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36975  #endif
36976  #ifdef __Pyx_StopAsyncIteration_USED
36977  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36978  #endif
36979  /*--- Library function declarations ---*/
36980  /*--- Threads initialization code ---*/
36981  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
36982  #ifdef WITH_THREAD /* Python build with threading support? */
36983  PyEval_InitThreads();
36984  #endif
36985  #endif
36986  /*--- Module creation code ---*/
36987  #if CYTHON_PEP489_MULTI_PHASE_INIT
36988  __pyx_m = __pyx_pyinit_module;
36989  Py_INCREF(__pyx_m);
36990  #else
36991  #if PY_MAJOR_VERSION < 3
36992  __pyx_m = Py_InitModule4("cmeshTools", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
36993  #else
36994  __pyx_m = PyModule_Create(&__pyx_moduledef);
36995  #endif
36996  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
36997  #endif
36998  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
36999  Py_INCREF(__pyx_d);
37000  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
37001  Py_INCREF(__pyx_b);
37002  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
37003  Py_INCREF(__pyx_cython_runtime);
37004  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
37005  /*--- Initialize various global constants etc. ---*/
37006  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
37007  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
37008  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
37009  #endif
37010  if (__pyx_module_is_main_cmeshTools) {
37011  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
37012  }
37013  #if PY_MAJOR_VERSION >= 3
37014  {
37015  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
37016  if (!PyDict_GetItemString(modules, "cmeshTools")) {
37017  if (unlikely(PyDict_SetItemString(modules, "cmeshTools", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
37018  }
37019  }
37020  #endif
37021  /*--- Builtin init code ---*/
37022  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
37023  /*--- Constants init code ---*/
37024  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
37025  /*--- Global type/function init code ---*/
37026  (void)__Pyx_modinit_global_init_code();
37027  (void)__Pyx_modinit_variable_export_code();
37028  (void)__Pyx_modinit_function_export_code();
37029  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
37030  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
37031  (void)__Pyx_modinit_variable_import_code();
37032  (void)__Pyx_modinit_function_import_code();
37033  /*--- Execution code ---*/
37034  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
37035  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
37036  #endif
37037 
37038  /* "cmeshTools.pyx":4
37039  * import cython
37040  * cimport cython
37041  * import numpy as np # <<<<<<<<<<<<<<
37042  * cimport numpy as np
37043  * from libcpp cimport bool
37044  */
37045  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
37046  __Pyx_GOTREF(__pyx_t_1);
37047  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(1, 4, __pyx_L1_error)
37048  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37049 
37050  /* "cmeshTools.pyx":7
37051  * cimport numpy as np
37052  * from libcpp cimport bool
37053  * from mpi4py import MPI # <<<<<<<<<<<<<<
37054  * cimport mesh as cppm
37055  * from proteus import Comm
37056  */
37057  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
37058  __Pyx_GOTREF(__pyx_t_1);
37059  __Pyx_INCREF(__pyx_n_s_MPI);
37060  __Pyx_GIVEREF(__pyx_n_s_MPI);
37061  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MPI);
37062  __pyx_t_2 = __Pyx_Import(__pyx_n_s_mpi4py, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
37063  __Pyx_GOTREF(__pyx_t_2);
37064  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37065  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
37066  __Pyx_GOTREF(__pyx_t_1);
37067  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPI, __pyx_t_1) < 0) __PYX_ERR(1, 7, __pyx_L1_error)
37068  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37069  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37070 
37071  /* "cmeshTools.pyx":9
37072  * from mpi4py import MPI
37073  * cimport mesh as cppm
37074  * from proteus import Comm # <<<<<<<<<<<<<<
37075  *
37076  * cdef class CMesh:
37077  */
37078  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
37079  __Pyx_GOTREF(__pyx_t_2);
37080  __Pyx_INCREF(__pyx_n_s_Comm);
37081  __Pyx_GIVEREF(__pyx_n_s_Comm);
37082  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Comm);
37083  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
37084  __Pyx_GOTREF(__pyx_t_1);
37085  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37086  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
37087  __Pyx_GOTREF(__pyx_t_2);
37088  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Comm, __pyx_t_2) < 0) __PYX_ERR(1, 9, __pyx_L1_error)
37089  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37090  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37091 
37092  /* "cmeshTools.pyx":117
37093  * self.volume = self.mesh.volume
37094  *
37095  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
37096  * """
37097  * function to be conform to old module, and to calls from MeshTools
37098  */
37099  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_1buildPythonMeshInterface, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
37100  __Pyx_GOTREF(__pyx_t_1);
37101  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMeshInterface, __pyx_t_1) < 0) __PYX_ERR(1, 117, __pyx_L1_error)
37102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37103 
37104  /* "cmeshTools.pyx":173
37105  * cmesh.volume)
37106  *
37107  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
37108  * """
37109  * function to be conform to old module, and to calls from MeshTools
37110  */
37111  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_3buildPythonMeshInterfaceNoArrays, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 173, __pyx_L1_error)
37112  __Pyx_GOTREF(__pyx_t_1);
37113  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMeshInterfaceNoArrays, __pyx_t_1) < 0) __PYX_ERR(1, 173, __pyx_L1_error)
37114  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37115 
37116  /* "cmeshTools.pyx":297
37117  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
37118  *
37119  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
37120  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
37121  * return (cmultilevelMesh.nLevels,
37122  */
37123  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_5buildPythonMultilevelMeshInterface, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 297, __pyx_L1_error)
37124  __Pyx_GOTREF(__pyx_t_1);
37125  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMultilevelMeshInterfa, __pyx_t_1) < 0) __PYX_ERR(1, 297, __pyx_L1_error)
37126  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37127 
37128  /* "cmeshTools.pyx":491
37129  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
37130  *
37131  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
37132  * CMultilevelMesh cmultilevelMesh,
37133  * np.ndarray elementTagArray,
37134  */
37135  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_67locallyRefineMultilevelMesh, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error)
37136  __Pyx_GOTREF(__pyx_t_1);
37137  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locallyRefineMultilevelMesh, __pyx_t_1) < 0) __PYX_ERR(1, 491, __pyx_L1_error)
37138  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37139 
37140  /* "cmeshTools.pyx":529
37141  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
37142  *
37143  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
37144  * if nSpace == 2:
37145  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
37146  */
37147  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_69setNewestNodeBases, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error)
37148  __Pyx_GOTREF(__pyx_t_1);
37149  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setNewestNodeBases, __pyx_t_1) < 0) __PYX_ERR(1, 529, __pyx_L1_error)
37150  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37151 
37152  /* "cmeshTools.pyx":1
37153  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
37154  * import cython
37155  * cimport cython
37156  */
37157  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
37158  __Pyx_GOTREF(__pyx_t_1);
37159  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
37160  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37161 
37162  /* "View.MemoryView":209
37163  * info.obj = self
37164  *
37165  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
37166  *
37167  * def __dealloc__(array self):
37168  */
37169  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
37170  __Pyx_GOTREF(__pyx_t_1);
37171  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 209, __pyx_L1_error)
37172  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37173  PyType_Modified(__pyx_array_type);
37174 
37175  /* "View.MemoryView":286
37176  * return self.name
37177  *
37178  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
37179  * cdef strided = Enum("<strided and direct>") # default
37180  * cdef indirect = Enum("<strided and indirect>")
37181  */
37182  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
37183  __Pyx_GOTREF(__pyx_t_1);
37184  __Pyx_XGOTREF(generic);
37185  __Pyx_DECREF_SET(generic, __pyx_t_1);
37186  __Pyx_GIVEREF(__pyx_t_1);
37187  __pyx_t_1 = 0;
37188 
37189  /* "View.MemoryView":287
37190  *
37191  * cdef generic = Enum("<strided and direct or indirect>")
37192  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
37193  * cdef indirect = Enum("<strided and indirect>")
37194  *
37195  */
37196  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
37197  __Pyx_GOTREF(__pyx_t_1);
37198  __Pyx_XGOTREF(strided);
37199  __Pyx_DECREF_SET(strided, __pyx_t_1);
37200  __Pyx_GIVEREF(__pyx_t_1);
37201  __pyx_t_1 = 0;
37202 
37203  /* "View.MemoryView":288
37204  * cdef generic = Enum("<strided and direct or indirect>")
37205  * cdef strided = Enum("<strided and direct>") # default
37206  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
37207  *
37208  *
37209  */
37210  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
37211  __Pyx_GOTREF(__pyx_t_1);
37212  __Pyx_XGOTREF(indirect);
37213  __Pyx_DECREF_SET(indirect, __pyx_t_1);
37214  __Pyx_GIVEREF(__pyx_t_1);
37215  __pyx_t_1 = 0;
37216 
37217  /* "View.MemoryView":291
37218  *
37219  *
37220  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
37221  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
37222  *
37223  */
37224  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
37225  __Pyx_GOTREF(__pyx_t_1);
37226  __Pyx_XGOTREF(contiguous);
37227  __Pyx_DECREF_SET(contiguous, __pyx_t_1);
37228  __Pyx_GIVEREF(__pyx_t_1);
37229  __pyx_t_1 = 0;
37230 
37231  /* "View.MemoryView":292
37232  *
37233  * cdef contiguous = Enum("<contiguous and direct>")
37234  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
37235  *
37236  *
37237  */
37238  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
37239  __Pyx_GOTREF(__pyx_t_1);
37240  __Pyx_XGOTREF(indirect_contiguous);
37241  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
37242  __Pyx_GIVEREF(__pyx_t_1);
37243  __pyx_t_1 = 0;
37244 
37245  /* "View.MemoryView":316
37246  *
37247  * DEF THREAD_LOCKS_PREALLOCATED = 8
37248  * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
37249  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
37250  * PyThread_allocate_lock(),
37251  */
37252  __pyx_memoryview_thread_locks_used = 0;
37253 
37254  /* "View.MemoryView":317
37255  * DEF THREAD_LOCKS_PREALLOCATED = 8
37256  * cdef int __pyx_memoryview_thread_locks_used = 0
37257  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
37258  * PyThread_allocate_lock(),
37259  * PyThread_allocate_lock(),
37260  */
37261  __pyx_t_3[0] = PyThread_allocate_lock();
37262  __pyx_t_3[1] = PyThread_allocate_lock();
37263  __pyx_t_3[2] = PyThread_allocate_lock();
37264  __pyx_t_3[3] = PyThread_allocate_lock();
37265  __pyx_t_3[4] = PyThread_allocate_lock();
37266  __pyx_t_3[5] = PyThread_allocate_lock();
37267  __pyx_t_3[6] = PyThread_allocate_lock();
37268  __pyx_t_3[7] = PyThread_allocate_lock();
37269  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_3, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
37270 
37271  /* "View.MemoryView":549
37272  * info.obj = self
37273  *
37274  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
37275  *
37276  *
37277  */
37278  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
37279  __Pyx_GOTREF(__pyx_t_1);
37280  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 549, __pyx_L1_error)
37281  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37282  PyType_Modified(__pyx_memoryview_type);
37283 
37284  /* "View.MemoryView":995
37285  * return self.from_object
37286  *
37287  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
37288  *
37289  *
37290  */
37291  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
37292  __Pyx_GOTREF(__pyx_t_1);
37293  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 995, __pyx_L1_error)
37294  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37295  PyType_Modified(__pyx_memoryviewslice_type);
37296 
37297  /* "(tree fragment)":1
37298  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
37299  * cdef object __pyx_PickleError
37300  * cdef object __pyx_result
37301  */
37302  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
37303  __Pyx_GOTREF(__pyx_t_1);
37304  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
37305  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37306 
37307  /* "BufferFormatFromTypeInfo":1463
37308  *
37309  * @cname('__pyx_format_from_typeinfo')
37310  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
37311  * cdef __Pyx_StructField *field
37312  * cdef __pyx_typeinfo_string fmt
37313  */
37314 
37315  /*--- Wrapped vars code ---*/
37316 
37317  goto __pyx_L0;
37318  __pyx_L1_error:;
37319  __Pyx_XDECREF(__pyx_t_1);
37320  __Pyx_XDECREF(__pyx_t_2);
37321  if (__pyx_m) {
37322  if (__pyx_d) {
37323  __Pyx_AddTraceback("init cmeshTools", __pyx_clineno, __pyx_lineno, __pyx_filename);
37324  }
37325  Py_CLEAR(__pyx_m);
37326  } else if (!PyErr_Occurred()) {
37327  PyErr_SetString(PyExc_ImportError, "init cmeshTools");
37328  }
37329  __pyx_L0:;
37330  __Pyx_RefNannyFinishContext();
37331  #if CYTHON_PEP489_MULTI_PHASE_INIT
37332  return (__pyx_m != NULL) ? 0 : -1;
37333  #elif PY_MAJOR_VERSION >= 3
37334  return __pyx_m;
37335  #else
37336  return;
37337  #endif
37338 }
37339 
37340 /* --- Runtime support code --- */
37341 /* Refnanny */
37342 #if CYTHON_REFNANNY
37343 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
37344  PyObject *m = NULL, *p = NULL;
37345  void *r = NULL;
37346  m = PyImport_ImportModule(modname);
37347  if (!m) goto end;
37348  p = PyObject_GetAttrString(m, "RefNannyAPI");
37349  if (!p) goto end;
37350  r = PyLong_AsVoidPtr(p);
37351 end:
37352  Py_XDECREF(p);
37353  Py_XDECREF(m);
37354  return (__Pyx_RefNannyAPIStruct *)r;
37355 }
37356 #endif
37357 
37358 /* PyObjectGetAttrStr */
37359 #if CYTHON_USE_TYPE_SLOTS
37360 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
37361  PyTypeObject* tp = Py_TYPE(obj);
37362  if (likely(tp->tp_getattro))
37363  return tp->tp_getattro(obj, attr_name);
37364 #if PY_MAJOR_VERSION < 3
37365  if (likely(tp->tp_getattr))
37366  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
37367 #endif
37368  return PyObject_GetAttr(obj, attr_name);
37369 }
37370 #endif
37371 
37372 /* GetBuiltinName */
37373 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
37374  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
37375  if (unlikely(!result)) {
37376  PyErr_Format(PyExc_NameError,
37377 #if PY_MAJOR_VERSION >= 3
37378  "name '%U' is not defined", name);
37379 #else
37380  "name '%.200s' is not defined", PyString_AS_STRING(name));
37381 #endif
37382  }
37383  return result;
37384 }
37385 
37386 /* RaiseArgTupleInvalid */
37387 static void __Pyx_RaiseArgtupleInvalid(
37388  const char* func_name,
37389  int exact,
37390  Py_ssize_t num_min,
37391  Py_ssize_t num_max,
37392  Py_ssize_t num_found)
37393 {
37394  Py_ssize_t num_expected;
37395  const char *more_or_less;
37396  if (num_found < num_min) {
37397  num_expected = num_min;
37398  more_or_less = "at least";
37399  } else {
37400  num_expected = num_max;
37401  more_or_less = "at most";
37402  }
37403  if (exact) {
37404  more_or_less = "exactly";
37405  }
37406  PyErr_Format(PyExc_TypeError,
37407  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
37408  func_name, more_or_less, num_expected,
37409  (num_expected == 1) ? "" : "s", num_found);
37410 }
37411 
37412 /* KeywordStringCheck */
37413 static int __Pyx_CheckKeywordStrings(
37414  PyObject *kwdict,
37415  const char* function_name,
37416  int kw_allowed)
37417 {
37418  PyObject* key = 0;
37419  Py_ssize_t pos = 0;
37420 #if CYTHON_COMPILING_IN_PYPY
37421  if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
37422  goto invalid_keyword;
37423  return 1;
37424 #else
37425  while (PyDict_Next(kwdict, &pos, &key, 0)) {
37426  #if PY_MAJOR_VERSION < 3
37427  if (unlikely(!PyString_Check(key)))
37428  #endif
37429  if (unlikely(!PyUnicode_Check(key)))
37430  goto invalid_keyword_type;
37431  }
37432  if ((!kw_allowed) && unlikely(key))
37433  goto invalid_keyword;
37434  return 1;
37435 invalid_keyword_type:
37436  PyErr_Format(PyExc_TypeError,
37437  "%.200s() keywords must be strings", function_name);
37438  return 0;
37439 #endif
37440 invalid_keyword:
37441  PyErr_Format(PyExc_TypeError,
37442  #if PY_MAJOR_VERSION < 3
37443  "%.200s() got an unexpected keyword argument '%.200s'",
37444  function_name, PyString_AsString(key));
37445  #else
37446  "%s() got an unexpected keyword argument '%U'",
37447  function_name, key);
37448  #endif
37449  return 0;
37450 }
37451 
37452 /* PyDictVersioning */
37453 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
37454 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
37455  PyObject *dict = Py_TYPE(obj)->tp_dict;
37456  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
37457 }
37458 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
37459  PyObject **dictptr = NULL;
37460  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
37461  if (offset) {
37462 #if CYTHON_COMPILING_IN_CPYTHON
37463  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
37464 #else
37465  dictptr = _PyObject_GetDictPtr(obj);
37466 #endif
37467  }
37468  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
37469 }
37470 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
37471  PyObject *dict = Py_TYPE(obj)->tp_dict;
37472  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
37473  return 0;
37474  return obj_dict_version == __Pyx_get_object_dict_version(obj);
37475 }
37476 #endif
37477 
37478 /* GetModuleGlobalName */
37479 #if CYTHON_USE_DICT_VERSIONS
37480 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
37481 #else
37482 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
37483 #endif
37484 {
37485  PyObject *result;
37486 #if !CYTHON_AVOID_BORROWED_REFS
37487 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
37488  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
37489  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
37490  if (likely(result)) {
37491  return __Pyx_NewRef(result);
37492  } else if (unlikely(PyErr_Occurred())) {
37493  return NULL;
37494  }
37495 #else
37496  result = PyDict_GetItem(__pyx_d, name);
37497  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
37498  if (likely(result)) {
37499  return __Pyx_NewRef(result);
37500  }
37501 #endif
37502 #else
37503  result = PyObject_GetItem(__pyx_d, name);
37504  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
37505  if (likely(result)) {
37506  return __Pyx_NewRef(result);
37507  }
37508  PyErr_Clear();
37509 #endif
37510  return __Pyx_GetBuiltinName(name);
37511 }
37512 
37513 /* PyCFunctionFastCall */
37514 #if CYTHON_FAST_PYCCALL
37515 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
37516  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
37517  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
37518  PyObject *self = PyCFunction_GET_SELF(func);
37519  int flags = PyCFunction_GET_FLAGS(func);
37520  assert(PyCFunction_Check(func));
37521  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
37522  assert(nargs >= 0);
37523  assert(nargs == 0 || args != NULL);
37524  /* _PyCFunction_FastCallDict() must not be called with an exception set,
37525  because it may clear it (directly or indirectly) and so the
37526  caller loses its exception */
37527  assert(!PyErr_Occurred());
37528  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
37529  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
37530  } else {
37531  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
37532  }
37533 }
37534 #endif
37535 
37536 /* PyFunctionFastCall */
37537 #if CYTHON_FAST_PYCALL
37538 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
37539  PyObject *globals) {
37540  PyFrameObject *f;
37541  PyThreadState *tstate = __Pyx_PyThreadState_Current;
37542  PyObject **fastlocals;
37543  Py_ssize_t i;
37544  PyObject *result;
37545  assert(globals != NULL);
37546  /* XXX Perhaps we should create a specialized
37547  PyFrame_New() that doesn't take locals, but does
37548  take builtins without sanity checking them.
37549  */
37550  assert(tstate != NULL);
37551  f = PyFrame_New(tstate, co, globals, NULL);
37552  if (f == NULL) {
37553  return NULL;
37554  }
37555  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
37556  for (i = 0; i < na; i++) {
37557  Py_INCREF(*args);
37558  fastlocals[i] = *args++;
37559  }
37560  result = PyEval_EvalFrameEx(f,0);
37561  ++tstate->recursion_depth;
37562  Py_DECREF(f);
37563  --tstate->recursion_depth;
37564  return result;
37565 }
37566 #if 1 || PY_VERSION_HEX < 0x030600B1
37567 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
37568  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
37569  PyObject *globals = PyFunction_GET_GLOBALS(func);
37570  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
37571  PyObject *closure;
37572 #if PY_MAJOR_VERSION >= 3
37573  PyObject *kwdefs;
37574 #endif
37575  PyObject *kwtuple, **k;
37576  PyObject **d;
37577  Py_ssize_t nd;
37578  Py_ssize_t nk;
37579  PyObject *result;
37580  assert(kwargs == NULL || PyDict_Check(kwargs));
37581  nk = kwargs ? PyDict_Size(kwargs) : 0;
37582  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
37583  return NULL;
37584  }
37585  if (
37586 #if PY_MAJOR_VERSION >= 3
37587  co->co_kwonlyargcount == 0 &&
37588 #endif
37589  likely(kwargs == NULL || nk == 0) &&
37590  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
37591  if (argdefs == NULL && co->co_argcount == nargs) {
37592  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
37593  goto done;
37594  }
37595  else if (nargs == 0 && argdefs != NULL
37596  && co->co_argcount == Py_SIZE(argdefs)) {
37597  /* function called with no arguments, but all parameters have
37598  a default value: use default values as arguments .*/
37599  args = &PyTuple_GET_ITEM(argdefs, 0);
37600  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
37601  goto done;
37602  }
37603  }
37604  if (kwargs != NULL) {
37605  Py_ssize_t pos, i;
37606  kwtuple = PyTuple_New(2 * nk);
37607  if (kwtuple == NULL) {
37608  result = NULL;
37609  goto done;
37610  }
37611  k = &PyTuple_GET_ITEM(kwtuple, 0);
37612  pos = i = 0;
37613  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
37614  Py_INCREF(k[i]);
37615  Py_INCREF(k[i+1]);
37616  i += 2;
37617  }
37618  nk = i / 2;
37619  }
37620  else {
37621  kwtuple = NULL;
37622  k = NULL;
37623  }
37624  closure = PyFunction_GET_CLOSURE(func);
37625 #if PY_MAJOR_VERSION >= 3
37626  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
37627 #endif
37628  if (argdefs != NULL) {
37629  d = &PyTuple_GET_ITEM(argdefs, 0);
37630  nd = Py_SIZE(argdefs);
37631  }
37632  else {
37633  d = NULL;
37634  nd = 0;
37635  }
37636 #if PY_MAJOR_VERSION >= 3
37637  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
37638  args, (int)nargs,
37639  k, (int)nk,
37640  d, (int)nd, kwdefs, closure);
37641 #else
37642  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
37643  args, (int)nargs,
37644  k, (int)nk,
37645  d, (int)nd, closure);
37646 #endif
37647  Py_XDECREF(kwtuple);
37648 done:
37649  Py_LeaveRecursiveCall();
37650  return result;
37651 }
37652 #endif
37653 #endif
37654 
37655 /* PyObjectCall */
37656 #if CYTHON_COMPILING_IN_CPYTHON
37657 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
37658  PyObject *result;
37659  ternaryfunc call = func->ob_type->tp_call;
37660  if (unlikely(!call))
37661  return PyObject_Call(func, arg, kw);
37662  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
37663  return NULL;
37664  result = (*call)(func, arg, kw);
37665  Py_LeaveRecursiveCall();
37666  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
37667  PyErr_SetString(
37668  PyExc_SystemError,
37669  "NULL result without error in PyObject_Call");
37670  }
37671  return result;
37672 }
37673 #endif
37674 
37675 /* PyObjectCall2Args */
37676 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
37677  PyObject *args, *result = NULL;
37678  #if CYTHON_FAST_PYCALL
37679  if (PyFunction_Check(function)) {
37680  PyObject *args[2] = {arg1, arg2};
37681  return __Pyx_PyFunction_FastCall(function, args, 2);
37682  }
37683  #endif
37684  #if CYTHON_FAST_PYCCALL
37685  if (__Pyx_PyFastCFunction_Check(function)) {
37686  PyObject *args[2] = {arg1, arg2};
37687  return __Pyx_PyCFunction_FastCall(function, args, 2);
37688  }
37689  #endif
37690  args = PyTuple_New(2);
37691  if (unlikely(!args)) goto done;
37692  Py_INCREF(arg1);
37693  PyTuple_SET_ITEM(args, 0, arg1);
37694  Py_INCREF(arg2);
37695  PyTuple_SET_ITEM(args, 1, arg2);
37696  Py_INCREF(function);
37697  result = __Pyx_PyObject_Call(function, args, NULL);
37698  Py_DECREF(args);
37699  Py_DECREF(function);
37700 done:
37701  return result;
37702 }
37703 
37704 /* PyObjectCallMethO */
37705 #if CYTHON_COMPILING_IN_CPYTHON
37706 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
37707  PyObject *self, *result;
37708  PyCFunction cfunc;
37709  cfunc = PyCFunction_GET_FUNCTION(func);
37710  self = PyCFunction_GET_SELF(func);
37711  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
37712  return NULL;
37713  result = cfunc(self, arg);
37714  Py_LeaveRecursiveCall();
37715  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
37716  PyErr_SetString(
37717  PyExc_SystemError,
37718  "NULL result without error in PyObject_Call");
37719  }
37720  return result;
37721 }
37722 #endif
37723 
37724 /* PyObjectCallOneArg */
37725 #if CYTHON_COMPILING_IN_CPYTHON
37726 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37727  PyObject *result;
37728  PyObject *args = PyTuple_New(1);
37729  if (unlikely(!args)) return NULL;
37730  Py_INCREF(arg);
37731  PyTuple_SET_ITEM(args, 0, arg);
37732  result = __Pyx_PyObject_Call(func, args, NULL);
37733  Py_DECREF(args);
37734  return result;
37735 }
37736 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37737 #if CYTHON_FAST_PYCALL
37738  if (PyFunction_Check(func)) {
37739  return __Pyx_PyFunction_FastCall(func, &arg, 1);
37740  }
37741 #endif
37742  if (likely(PyCFunction_Check(func))) {
37743  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
37744  return __Pyx_PyObject_CallMethO(func, arg);
37745 #if CYTHON_FAST_PYCCALL
37746  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
37747  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
37748 #endif
37749  }
37750  }
37751  return __Pyx__PyObject_CallOneArg(func, arg);
37752 }
37753 #else
37754 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37755  PyObject *result;
37756  PyObject *args = PyTuple_Pack(1, arg);
37757  if (unlikely(!args)) return NULL;
37758  result = __Pyx_PyObject_Call(func, args, NULL);
37759  Py_DECREF(args);
37760  return result;
37761 }
37762 #endif
37763 
37764 /* ExtTypeTest */
37765 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
37766  if (unlikely(!type)) {
37767  PyErr_SetString(PyExc_SystemError, "Missing type object");
37768  return 0;
37769  }
37770  if (likely(__Pyx_TypeCheck(obj, type)))
37771  return 1;
37772  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
37773  Py_TYPE(obj)->tp_name, type->tp_name);
37774  return 0;
37775 }
37776 
37777 /* PyErrFetchRestore */
37778 #if CYTHON_FAST_THREAD_STATE
37779 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
37780  PyObject *tmp_type, *tmp_value, *tmp_tb;
37781  tmp_type = tstate->curexc_type;
37782  tmp_value = tstate->curexc_value;
37783  tmp_tb = tstate->curexc_traceback;
37784  tstate->curexc_type = type;
37785  tstate->curexc_value = value;
37786  tstate->curexc_traceback = tb;
37787  Py_XDECREF(tmp_type);
37788  Py_XDECREF(tmp_value);
37789  Py_XDECREF(tmp_tb);
37790 }
37791 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
37792  *type = tstate->curexc_type;
37793  *value = tstate->curexc_value;
37794  *tb = tstate->curexc_traceback;
37795  tstate->curexc_type = 0;
37796  tstate->curexc_value = 0;
37797  tstate->curexc_traceback = 0;
37798 }
37799 #endif
37800 
37801 /* RaiseException */
37802 #if PY_MAJOR_VERSION < 3
37803 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
37804  CYTHON_UNUSED PyObject *cause) {
37805  __Pyx_PyThreadState_declare
37806  Py_XINCREF(type);
37807  if (!value || value == Py_None)
37808  value = NULL;
37809  else
37810  Py_INCREF(value);
37811  if (!tb || tb == Py_None)
37812  tb = NULL;
37813  else {
37814  Py_INCREF(tb);
37815  if (!PyTraceBack_Check(tb)) {
37816  PyErr_SetString(PyExc_TypeError,
37817  "raise: arg 3 must be a traceback or None");
37818  goto raise_error;
37819  }
37820  }
37821  if (PyType_Check(type)) {
37822 #if CYTHON_COMPILING_IN_PYPY
37823  if (!value) {
37824  Py_INCREF(Py_None);
37825  value = Py_None;
37826  }
37827 #endif
37828  PyErr_NormalizeException(&type, &value, &tb);
37829  } else {
37830  if (value) {
37831  PyErr_SetString(PyExc_TypeError,
37832  "instance exception may not have a separate value");
37833  goto raise_error;
37834  }
37835  value = type;
37836  type = (PyObject*) Py_TYPE(type);
37837  Py_INCREF(type);
37838  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
37839  PyErr_SetString(PyExc_TypeError,
37840  "raise: exception class must be a subclass of BaseException");
37841  goto raise_error;
37842  }
37843  }
37844  __Pyx_PyThreadState_assign
37845  __Pyx_ErrRestore(type, value, tb);
37846  return;
37847 raise_error:
37848  Py_XDECREF(value);
37849  Py_XDECREF(type);
37850  Py_XDECREF(tb);
37851  return;
37852 }
37853 #else
37854 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
37855  PyObject* owned_instance = NULL;
37856  if (tb == Py_None) {
37857  tb = 0;
37858  } else if (tb && !PyTraceBack_Check(tb)) {
37859  PyErr_SetString(PyExc_TypeError,
37860  "raise: arg 3 must be a traceback or None");
37861  goto bad;
37862  }
37863  if (value == Py_None)
37864  value = 0;
37865  if (PyExceptionInstance_Check(type)) {
37866  if (value) {
37867  PyErr_SetString(PyExc_TypeError,
37868  "instance exception may not have a separate value");
37869  goto bad;
37870  }
37871  value = type;
37872  type = (PyObject*) Py_TYPE(value);
37873  } else if (PyExceptionClass_Check(type)) {
37874  PyObject *instance_class = NULL;
37875  if (value && PyExceptionInstance_Check(value)) {
37876  instance_class = (PyObject*) Py_TYPE(value);
37877  if (instance_class != type) {
37878  int is_subclass = PyObject_IsSubclass(instance_class, type);
37879  if (!is_subclass) {
37880  instance_class = NULL;
37881  } else if (unlikely(is_subclass == -1)) {
37882  goto bad;
37883  } else {
37884  type = instance_class;
37885  }
37886  }
37887  }
37888  if (!instance_class) {
37889  PyObject *args;
37890  if (!value)
37891  args = PyTuple_New(0);
37892  else if (PyTuple_Check(value)) {
37893  Py_INCREF(value);
37894  args = value;
37895  } else
37896  args = PyTuple_Pack(1, value);
37897  if (!args)
37898  goto bad;
37899  owned_instance = PyObject_Call(type, args, NULL);
37900  Py_DECREF(args);
37901  if (!owned_instance)
37902  goto bad;
37903  value = owned_instance;
37904  if (!PyExceptionInstance_Check(value)) {
37905  PyErr_Format(PyExc_TypeError,
37906  "calling %R should have returned an instance of "
37907  "BaseException, not %R",
37908  type, Py_TYPE(value));
37909  goto bad;
37910  }
37911  }
37912  } else {
37913  PyErr_SetString(PyExc_TypeError,
37914  "raise: exception class must be a subclass of BaseException");
37915  goto bad;
37916  }
37917  if (cause) {
37918  PyObject *fixed_cause;
37919  if (cause == Py_None) {
37920  fixed_cause = NULL;
37921  } else if (PyExceptionClass_Check(cause)) {
37922  fixed_cause = PyObject_CallObject(cause, NULL);
37923  if (fixed_cause == NULL)
37924  goto bad;
37925  } else if (PyExceptionInstance_Check(cause)) {
37926  fixed_cause = cause;
37927  Py_INCREF(fixed_cause);
37928  } else {
37929  PyErr_SetString(PyExc_TypeError,
37930  "exception causes must derive from "
37931  "BaseException");
37932  goto bad;
37933  }
37934  PyException_SetCause(value, fixed_cause);
37935  }
37936  PyErr_SetObject(type, value);
37937  if (tb) {
37938 #if CYTHON_COMPILING_IN_PYPY
37939  PyObject *tmp_type, *tmp_value, *tmp_tb;
37940  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
37941  Py_INCREF(tb);
37942  PyErr_Restore(tmp_type, tmp_value, tb);
37943  Py_XDECREF(tmp_tb);
37944 #else
37945  PyThreadState *tstate = __Pyx_PyThreadState_Current;
37946  PyObject* tmp_tb = tstate->curexc_traceback;
37947  if (tb != tmp_tb) {
37948  Py_INCREF(tb);
37949  tstate->curexc_traceback = tb;
37950  Py_XDECREF(tmp_tb);
37951  }
37952 #endif
37953  }
37954 bad:
37955  Py_XDECREF(owned_instance);
37956  return;
37957 }
37958 #endif
37959 
37960 /* PyObjectCallNoArg */
37961 #if CYTHON_COMPILING_IN_CPYTHON
37962 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
37963 #if CYTHON_FAST_PYCALL
37964  if (PyFunction_Check(func)) {
37965  return __Pyx_PyFunction_FastCall(func, NULL, 0);
37966  }
37967 #endif
37968 #ifdef __Pyx_CyFunction_USED
37969  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
37970 #else
37971  if (likely(PyCFunction_Check(func)))
37972 #endif
37973  {
37974  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
37975  return __Pyx_PyObject_CallMethO(func, NULL);
37976  }
37977  }
37978  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
37979 }
37980 #endif
37981 
37982 /* RaiseDoubleKeywords */
37983 static void __Pyx_RaiseDoubleKeywordsError(
37984  const char* func_name,
37985  PyObject* kw_name)
37986 {
37987  PyErr_Format(PyExc_TypeError,
37988  #if PY_MAJOR_VERSION >= 3
37989  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
37990  #else
37991  "%s() got multiple values for keyword argument '%s'", func_name,
37992  PyString_AsString(kw_name));
37993  #endif
37994 }
37995 
37996 /* ParseKeywords */
37997 static int __Pyx_ParseOptionalKeywords(
37998  PyObject *kwds,
37999  PyObject **argnames[],
38000  PyObject *kwds2,
38001  PyObject *values[],
38002  Py_ssize_t num_pos_args,
38003  const char* function_name)
38004 {
38005  PyObject *key = 0, *value = 0;
38006  Py_ssize_t pos = 0;
38007  PyObject*** name;
38008  PyObject*** first_kw_arg = argnames + num_pos_args;
38009  while (PyDict_Next(kwds, &pos, &key, &value)) {
38010  name = first_kw_arg;
38011  while (*name && (**name != key)) name++;
38012  if (*name) {
38013  values[name-argnames] = value;
38014  continue;
38015  }
38016  name = first_kw_arg;
38017  #if PY_MAJOR_VERSION < 3
38018  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
38019  while (*name) {
38020  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
38021  && _PyString_Eq(**name, key)) {
38022  values[name-argnames] = value;
38023  break;
38024  }
38025  name++;
38026  }
38027  if (*name) continue;
38028  else {
38029  PyObject*** argname = argnames;
38030  while (argname != first_kw_arg) {
38031  if ((**argname == key) || (
38032  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
38033  && _PyString_Eq(**argname, key))) {
38034  goto arg_passed_twice;
38035  }
38036  argname++;
38037  }
38038  }
38039  } else
38040  #endif
38041  if (likely(PyUnicode_Check(key))) {
38042  while (*name) {
38043  int cmp = (**name == key) ? 0 :
38044  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
38045  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
38046  #endif
38047  PyUnicode_Compare(**name, key);
38048  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
38049  if (cmp == 0) {
38050  values[name-argnames] = value;
38051  break;
38052  }
38053  name++;
38054  }
38055  if (*name) continue;
38056  else {
38057  PyObject*** argname = argnames;
38058  while (argname != first_kw_arg) {
38059  int cmp = (**argname == key) ? 0 :
38060  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
38061  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
38062  #endif
38063  PyUnicode_Compare(**argname, key);
38064  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
38065  if (cmp == 0) goto arg_passed_twice;
38066  argname++;
38067  }
38068  }
38069  } else
38070  goto invalid_keyword_type;
38071  if (kwds2) {
38072  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
38073  } else {
38074  goto invalid_keyword;
38075  }
38076  }
38077  return 0;
38078 arg_passed_twice:
38079  __Pyx_RaiseDoubleKeywordsError(function_name, key);
38080  goto bad;
38081 invalid_keyword_type:
38082  PyErr_Format(PyExc_TypeError,
38083  "%.200s() keywords must be strings", function_name);
38084  goto bad;
38085 invalid_keyword:
38086  PyErr_Format(PyExc_TypeError,
38087  #if PY_MAJOR_VERSION < 3
38088  "%.200s() got an unexpected keyword argument '%.200s'",
38089  function_name, PyString_AsString(key));
38090  #else
38091  "%s() got an unexpected keyword argument '%U'",
38092  function_name, key);
38093  #endif
38094 bad:
38095  return -1;
38096 }
38097 
38098 /* ArgTypeTest */
38099 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
38100 {
38101  if (unlikely(!type)) {
38102  PyErr_SetString(PyExc_SystemError, "Missing type object");
38103  return 0;
38104  }
38105  else if (exact) {
38106  #if PY_MAJOR_VERSION == 2
38107  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
38108  #endif
38109  }
38110  else {
38111  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
38112  }
38113  PyErr_Format(PyExc_TypeError,
38114  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
38115  name, type->tp_name, Py_TYPE(obj)->tp_name);
38116  return 0;
38117 }
38118 
38119 /* PyIntBinop */
38120 #if !CYTHON_COMPILING_IN_PYPY
38121 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
38122  (void)inplace;
38123  (void)zerodivision_check;
38124  #if PY_MAJOR_VERSION < 3
38125  if (likely(PyInt_CheckExact(op1))) {
38126  const long b = intval;
38127  long x;
38128  long a = PyInt_AS_LONG(op1);
38129  x = (long)((unsigned long)a - b);
38130  if (likely((x^a) >= 0 || (x^~b) >= 0))
38131  return PyInt_FromLong(x);
38132  return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
38133  }
38134  #endif
38135  #if CYTHON_USE_PYLONG_INTERNALS
38136  if (likely(PyLong_CheckExact(op1))) {
38137  const long b = intval;
38138  long a, x;
38139 #ifdef HAVE_LONG_LONG
38140  const PY_LONG_LONG llb = intval;
38141  PY_LONG_LONG lla, llx;
38142 #endif
38143  const digit* digits = ((PyLongObject*)op1)->ob_digit;
38144  const Py_ssize_t size = Py_SIZE(op1);
38145  if (likely(__Pyx_sst_abs(size) <= 1)) {
38146  a = likely(size) ? digits[0] : 0;
38147  if (size == -1) a = -a;
38148  } else {
38149  switch (size) {
38150  case -2:
38151  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
38152  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38153  break;
38154 #ifdef HAVE_LONG_LONG
38155  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
38156  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38157  goto long_long;
38158 #endif
38159  }
38160  CYTHON_FALLTHROUGH;
38161  case 2:
38162  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
38163  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38164  break;
38165 #ifdef HAVE_LONG_LONG
38166  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
38167  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38168  goto long_long;
38169 #endif
38170  }
38171  CYTHON_FALLTHROUGH;
38172  case -3:
38173  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38174  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38175  break;
38176 #ifdef HAVE_LONG_LONG
38177  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38178  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38179  goto long_long;
38180 #endif
38181  }
38182  CYTHON_FALLTHROUGH;
38183  case 3:
38184  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38185  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38186  break;
38187 #ifdef HAVE_LONG_LONG
38188  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38189  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38190  goto long_long;
38191 #endif
38192  }
38193  CYTHON_FALLTHROUGH;
38194  case -4:
38195  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
38196  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38197  break;
38198 #ifdef HAVE_LONG_LONG
38199  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
38200  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38201  goto long_long;
38202 #endif
38203  }
38204  CYTHON_FALLTHROUGH;
38205  case 4:
38206  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
38207  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38208  break;
38209 #ifdef HAVE_LONG_LONG
38210  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
38211  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38212  goto long_long;
38213 #endif
38214  }
38215  CYTHON_FALLTHROUGH;
38216  default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
38217  }
38218  }
38219  x = a - b;
38220  return PyLong_FromLong(x);
38221 #ifdef HAVE_LONG_LONG
38222  long_long:
38223  llx = lla - llb;
38224  return PyLong_FromLongLong(llx);
38225 #endif
38226 
38227 
38228  }
38229  #endif
38230  if (PyFloat_CheckExact(op1)) {
38231  const long b = intval;
38232  double a = PyFloat_AS_DOUBLE(op1);
38233  double result;
38234  PyFPE_START_PROTECT("subtract", return NULL)
38235  result = ((double)a) - (double)b;
38236  PyFPE_END_PROTECT(result)
38237  return PyFloat_FromDouble(result);
38238  }
38239  return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
38240 }
38241 #endif
38242 
38243 /* PyIntCompare */
38244 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
38245  if (op1 == op2) {
38246  Py_RETURN_TRUE;
38247  }
38248  #if PY_MAJOR_VERSION < 3
38249  if (likely(PyInt_CheckExact(op1))) {
38250  const long b = intval;
38251  long a = PyInt_AS_LONG(op1);
38252  if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38253  }
38254  #endif
38255  #if CYTHON_USE_PYLONG_INTERNALS
38256  if (likely(PyLong_CheckExact(op1))) {
38257  int unequal;
38258  unsigned long uintval;
38259  Py_ssize_t size = Py_SIZE(op1);
38260  const digit* digits = ((PyLongObject*)op1)->ob_digit;
38261  if (intval == 0) {
38262  if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38263  } else if (intval < 0) {
38264  if (size >= 0)
38265  Py_RETURN_FALSE;
38266  intval = -intval;
38267  size = -size;
38268  } else {
38269  if (size <= 0)
38270  Py_RETURN_FALSE;
38271  }
38272  uintval = (unsigned long) intval;
38273 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
38274  if (uintval >> (PyLong_SHIFT * 4)) {
38275  unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38276  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38277  } else
38278 #endif
38279 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
38280  if (uintval >> (PyLong_SHIFT * 3)) {
38281  unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38282  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38283  } else
38284 #endif
38285 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
38286  if (uintval >> (PyLong_SHIFT * 2)) {
38287  unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38288  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38289  } else
38290 #endif
38291 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
38292  if (uintval >> (PyLong_SHIFT * 1)) {
38293  unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38294  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38295  } else
38296 #endif
38297  unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
38298  if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38299  }
38300  #endif
38301  if (PyFloat_CheckExact(op1)) {
38302  const long b = intval;
38303  double a = PyFloat_AS_DOUBLE(op1);
38304  if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38305  }
38306  return (
38307  PyObject_RichCompare(op1, op2, Py_EQ));
38308 }
38309 
38310 /* WriteUnraisableException */
38311 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
38312  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
38313  int full_traceback, CYTHON_UNUSED int nogil) {
38314  PyObject *old_exc, *old_val, *old_tb;
38315  PyObject *ctx;
38316  __Pyx_PyThreadState_declare
38317 #ifdef WITH_THREAD
38318  PyGILState_STATE state;
38319  if (nogil)
38320  state = PyGILState_Ensure();
38321 #ifdef _MSC_VER
38322  else state = (PyGILState_STATE)-1;
38323 #endif
38324 #endif
38325  __Pyx_PyThreadState_assign
38326  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
38327  if (full_traceback) {
38328  Py_XINCREF(old_exc);
38329  Py_XINCREF(old_val);
38330  Py_XINCREF(old_tb);
38331  __Pyx_ErrRestore(old_exc, old_val, old_tb);
38332  PyErr_PrintEx(1);
38333  }
38334  #if PY_MAJOR_VERSION < 3
38335  ctx = PyString_FromString(name);
38336  #else
38337  ctx = PyUnicode_FromString(name);
38338  #endif
38339  __Pyx_ErrRestore(old_exc, old_val, old_tb);
38340  if (!ctx) {
38341  PyErr_WriteUnraisable(Py_None);
38342  } else {
38343  PyErr_WriteUnraisable(ctx);
38344  Py_DECREF(ctx);
38345  }
38346 #ifdef WITH_THREAD
38347  if (nogil)
38348  PyGILState_Release(state);
38349 #endif
38350 }
38351 
38352 /* DictGetItem */
38353 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
38354 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
38355  PyObject *value;
38356  value = PyDict_GetItemWithError(d, key);
38357  if (unlikely(!value)) {
38358  if (!PyErr_Occurred()) {
38359  if (unlikely(PyTuple_Check(key))) {
38360  PyObject* args = PyTuple_Pack(1, key);
38361  if (likely(args)) {
38362  PyErr_SetObject(PyExc_KeyError, args);
38363  Py_DECREF(args);
38364  }
38365  } else {
38366  PyErr_SetObject(PyExc_KeyError, key);
38367  }
38368  }
38369  return NULL;
38370  }
38371  Py_INCREF(value);
38372  return value;
38373 }
38374 #endif
38375 
38376 /* RaiseTooManyValuesToUnpack */
38377 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
38378  PyErr_Format(PyExc_ValueError,
38379  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
38380 }
38381 
38382 /* RaiseNeedMoreValuesToUnpack */
38383 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
38384  PyErr_Format(PyExc_ValueError,
38385  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
38386  index, (index == 1) ? "" : "s");
38387 }
38388 
38389 /* RaiseNoneIterError */
38390 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
38391  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
38392 }
38393 
38394 /* GetTopmostException */
38395 #if CYTHON_USE_EXC_INFO_STACK
38396 static _PyErr_StackItem *
38397 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
38398 {
38399  _PyErr_StackItem *exc_info = tstate->exc_info;
38400  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
38401  exc_info->previous_item != NULL)
38402  {
38403  exc_info = exc_info->previous_item;
38404  }
38405  return exc_info;
38406 }
38407 #endif
38408 
38409 /* SaveResetException */
38410 #if CYTHON_FAST_THREAD_STATE
38411 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
38412  #if CYTHON_USE_EXC_INFO_STACK
38413  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
38414  *type = exc_info->exc_type;
38415  *value = exc_info->exc_value;
38416  *tb = exc_info->exc_traceback;
38417  #else
38418  *type = tstate->exc_type;
38419  *value = tstate->exc_value;
38420  *tb = tstate->exc_traceback;
38421  #endif
38422  Py_XINCREF(*type);
38423  Py_XINCREF(*value);
38424  Py_XINCREF(*tb);
38425 }
38426 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
38427  PyObject *tmp_type, *tmp_value, *tmp_tb;
38428  #if CYTHON_USE_EXC_INFO_STACK
38429  _PyErr_StackItem *exc_info = tstate->exc_info;
38430  tmp_type = exc_info->exc_type;
38431  tmp_value = exc_info->exc_value;
38432  tmp_tb = exc_info->exc_traceback;
38433  exc_info->exc_type = type;
38434  exc_info->exc_value = value;
38435  exc_info->exc_traceback = tb;
38436  #else
38437  tmp_type = tstate->exc_type;
38438  tmp_value = tstate->exc_value;
38439  tmp_tb = tstate->exc_traceback;
38440  tstate->exc_type = type;
38441  tstate->exc_value = value;
38442  tstate->exc_traceback = tb;
38443  #endif
38444  Py_XDECREF(tmp_type);
38445  Py_XDECREF(tmp_value);
38446  Py_XDECREF(tmp_tb);
38447 }
38448 #endif
38449 
38450 /* PyErrExceptionMatches */
38451 #if CYTHON_FAST_THREAD_STATE
38452 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
38453  Py_ssize_t i, n;
38454  n = PyTuple_GET_SIZE(tuple);
38455 #if PY_MAJOR_VERSION >= 3
38456  for (i=0; i<n; i++) {
38457  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
38458  }
38459 #endif
38460  for (i=0; i<n; i++) {
38461  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
38462  }
38463  return 0;
38464 }
38465 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
38466  PyObject *exc_type = tstate->curexc_type;
38467  if (exc_type == err) return 1;
38468  if (unlikely(!exc_type)) return 0;
38469  if (unlikely(PyTuple_Check(err)))
38470  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
38471  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
38472 }
38473 #endif
38474 
38475 /* GetException */
38476 #if CYTHON_FAST_THREAD_STATE
38477 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
38478 #else
38479 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
38480 #endif
38481 {
38482  PyObject *local_type, *local_value, *local_tb;
38483 #if CYTHON_FAST_THREAD_STATE
38484  PyObject *tmp_type, *tmp_value, *tmp_tb;
38485  local_type = tstate->curexc_type;
38486  local_value = tstate->curexc_value;
38487  local_tb = tstate->curexc_traceback;
38488  tstate->curexc_type = 0;
38489  tstate->curexc_value = 0;
38490  tstate->curexc_traceback = 0;
38491 #else
38492  PyErr_Fetch(&local_type, &local_value, &local_tb);
38493 #endif
38494  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
38495 #if CYTHON_FAST_THREAD_STATE
38496  if (unlikely(tstate->curexc_type))
38497 #else
38498  if (unlikely(PyErr_Occurred()))
38499 #endif
38500  goto bad;
38501  #if PY_MAJOR_VERSION >= 3
38502  if (local_tb) {
38503  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
38504  goto bad;
38505  }
38506  #endif
38507  Py_XINCREF(local_tb);
38508  Py_XINCREF(local_type);
38509  Py_XINCREF(local_value);
38510  *type = local_type;
38511  *value = local_value;
38512  *tb = local_tb;
38513 #if CYTHON_FAST_THREAD_STATE
38514  #if CYTHON_USE_EXC_INFO_STACK
38515  {
38516  _PyErr_StackItem *exc_info = tstate->exc_info;
38517  tmp_type = exc_info->exc_type;
38518  tmp_value = exc_info->exc_value;
38519  tmp_tb = exc_info->exc_traceback;
38520  exc_info->exc_type = local_type;
38521  exc_info->exc_value = local_value;
38522  exc_info->exc_traceback = local_tb;
38523  }
38524  #else
38525  tmp_type = tstate->exc_type;
38526  tmp_value = tstate->exc_value;
38527  tmp_tb = tstate->exc_traceback;
38528  tstate->exc_type = local_type;
38529  tstate->exc_value = local_value;
38530  tstate->exc_traceback = local_tb;
38531  #endif
38532  Py_XDECREF(tmp_type);
38533  Py_XDECREF(tmp_value);
38534  Py_XDECREF(tmp_tb);
38535 #else
38536  PyErr_SetExcInfo(local_type, local_value, local_tb);
38537 #endif
38538  return 0;
38539 bad:
38540  *type = 0;
38541  *value = 0;
38542  *tb = 0;
38543  Py_XDECREF(local_type);
38544  Py_XDECREF(local_value);
38545  Py_XDECREF(local_tb);
38546  return -1;
38547 }
38548 
38549 /* BytesEquals */
38550 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
38551 #if CYTHON_COMPILING_IN_PYPY
38552  return PyObject_RichCompareBool(s1, s2, equals);
38553 #else
38554  if (s1 == s2) {
38555  return (equals == Py_EQ);
38556  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
38557  const char *ps1, *ps2;
38558  Py_ssize_t length = PyBytes_GET_SIZE(s1);
38559  if (length != PyBytes_GET_SIZE(s2))
38560  return (equals == Py_NE);
38561  ps1 = PyBytes_AS_STRING(s1);
38562  ps2 = PyBytes_AS_STRING(s2);
38563  if (ps1[0] != ps2[0]) {
38564  return (equals == Py_NE);
38565  } else if (length == 1) {
38566  return (equals == Py_EQ);
38567  } else {
38568  int result;
38569 #if CYTHON_USE_UNICODE_INTERNALS
38570  Py_hash_t hash1, hash2;
38571  hash1 = ((PyBytesObject*)s1)->ob_shash;
38572  hash2 = ((PyBytesObject*)s2)->ob_shash;
38573  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38574  return (equals == Py_NE);
38575  }
38576 #endif
38577  result = memcmp(ps1, ps2, (size_t)length);
38578  return (equals == Py_EQ) ? (result == 0) : (result != 0);
38579  }
38580  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
38581  return (equals == Py_NE);
38582  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
38583  return (equals == Py_NE);
38584  } else {
38585  int result;
38586  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38587  if (!py_result)
38588  return -1;
38589  result = __Pyx_PyObject_IsTrue(py_result);
38590  Py_DECREF(py_result);
38591  return result;
38592  }
38593 #endif
38594 }
38595 
38596 /* UnicodeEquals */
38597 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
38598 #if CYTHON_COMPILING_IN_PYPY
38599  return PyObject_RichCompareBool(s1, s2, equals);
38600 #else
38601 #if PY_MAJOR_VERSION < 3
38602  PyObject* owned_ref = NULL;
38603 #endif
38604  int s1_is_unicode, s2_is_unicode;
38605  if (s1 == s2) {
38606  goto return_eq;
38607  }
38608  s1_is_unicode = PyUnicode_CheckExact(s1);
38609  s2_is_unicode = PyUnicode_CheckExact(s2);
38610 #if PY_MAJOR_VERSION < 3
38611  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
38612  owned_ref = PyUnicode_FromObject(s2);
38613  if (unlikely(!owned_ref))
38614  return -1;
38615  s2 = owned_ref;
38616  s2_is_unicode = 1;
38617  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
38618  owned_ref = PyUnicode_FromObject(s1);
38619  if (unlikely(!owned_ref))
38620  return -1;
38621  s1 = owned_ref;
38622  s1_is_unicode = 1;
38623  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
38624  return __Pyx_PyBytes_Equals(s1, s2, equals);
38625  }
38626 #endif
38627  if (s1_is_unicode & s2_is_unicode) {
38628  Py_ssize_t length;
38629  int kind;
38630  void *data1, *data2;
38631  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
38632  return -1;
38633  length = __Pyx_PyUnicode_GET_LENGTH(s1);
38634  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
38635  goto return_ne;
38636  }
38637 #if CYTHON_USE_UNICODE_INTERNALS
38638  {
38639  Py_hash_t hash1, hash2;
38640  #if CYTHON_PEP393_ENABLED
38641  hash1 = ((PyASCIIObject*)s1)->hash;
38642  hash2 = ((PyASCIIObject*)s2)->hash;
38643  #else
38644  hash1 = ((PyUnicodeObject*)s1)->hash;
38645  hash2 = ((PyUnicodeObject*)s2)->hash;
38646  #endif
38647  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38648  goto return_ne;
38649  }
38650  }
38651 #endif
38652  kind = __Pyx_PyUnicode_KIND(s1);
38653  if (kind != __Pyx_PyUnicode_KIND(s2)) {
38654  goto return_ne;
38655  }
38656  data1 = __Pyx_PyUnicode_DATA(s1);
38657  data2 = __Pyx_PyUnicode_DATA(s2);
38658  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
38659  goto return_ne;
38660  } else if (length == 1) {
38661  goto return_eq;
38662  } else {
38663  int result = memcmp(data1, data2, (size_t)(length * kind));
38664  #if PY_MAJOR_VERSION < 3
38665  Py_XDECREF(owned_ref);
38666  #endif
38667  return (equals == Py_EQ) ? (result == 0) : (result != 0);
38668  }
38669  } else if ((s1 == Py_None) & s2_is_unicode) {
38670  goto return_ne;
38671  } else if ((s2 == Py_None) & s1_is_unicode) {
38672  goto return_ne;
38673  } else {
38674  int result;
38675  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38676  #if PY_MAJOR_VERSION < 3
38677  Py_XDECREF(owned_ref);
38678  #endif
38679  if (!py_result)
38680  return -1;
38681  result = __Pyx_PyObject_IsTrue(py_result);
38682  Py_DECREF(py_result);
38683  return result;
38684  }
38685 return_eq:
38686  #if PY_MAJOR_VERSION < 3
38687  Py_XDECREF(owned_ref);
38688  #endif
38689  return (equals == Py_EQ);
38690 return_ne:
38691  #if PY_MAJOR_VERSION < 3
38692  Py_XDECREF(owned_ref);
38693  #endif
38694  return (equals == Py_NE);
38695 #endif
38696 }
38697 
38698 /* None */
38699 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
38700  Py_ssize_t q = a / b;
38701  Py_ssize_t r = a - q*b;
38702  q -= ((r != 0) & ((r ^ b) < 0));
38703  return q;
38704 }
38705 
38706 /* GetAttr */
38707 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
38708 #if CYTHON_USE_TYPE_SLOTS
38709 #if PY_MAJOR_VERSION >= 3
38710  if (likely(PyUnicode_Check(n)))
38711 #else
38712  if (likely(PyString_Check(n)))
38713 #endif
38714  return __Pyx_PyObject_GetAttrStr(o, n);
38715 #endif
38716  return PyObject_GetAttr(o, n);
38717 }
38718 
38719 /* GetItemInt */
38720 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
38721  PyObject *r;
38722  if (!j) return NULL;
38723  r = PyObject_GetItem(o, j);
38724  Py_DECREF(j);
38725  return r;
38726 }
38727 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
38728  CYTHON_NCP_UNUSED int wraparound,
38729  CYTHON_NCP_UNUSED int boundscheck) {
38730 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38731  Py_ssize_t wrapped_i = i;
38732  if (wraparound & unlikely(i < 0)) {
38733  wrapped_i += PyList_GET_SIZE(o);
38734  }
38735  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
38736  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
38737  Py_INCREF(r);
38738  return r;
38739  }
38740  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38741 #else
38742  return PySequence_GetItem(o, i);
38743 #endif
38744 }
38745 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
38746  CYTHON_NCP_UNUSED int wraparound,
38747  CYTHON_NCP_UNUSED int boundscheck) {
38748 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38749  Py_ssize_t wrapped_i = i;
38750  if (wraparound & unlikely(i < 0)) {
38751  wrapped_i += PyTuple_GET_SIZE(o);
38752  }
38753  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
38754  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
38755  Py_INCREF(r);
38756  return r;
38757  }
38758  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38759 #else
38760  return PySequence_GetItem(o, i);
38761 #endif
38762 }
38763 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
38764  CYTHON_NCP_UNUSED int wraparound,
38765  CYTHON_NCP_UNUSED int boundscheck) {
38766 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
38767  if (is_list || PyList_CheckExact(o)) {
38768  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
38769  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
38770  PyObject *r = PyList_GET_ITEM(o, n);
38771  Py_INCREF(r);
38772  return r;
38773  }
38774  }
38775  else if (PyTuple_CheckExact(o)) {
38776  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
38777  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
38778  PyObject *r = PyTuple_GET_ITEM(o, n);
38779  Py_INCREF(r);
38780  return r;
38781  }
38782  } else {
38783  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
38784  if (likely(m && m->sq_item)) {
38785  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
38786  Py_ssize_t l = m->sq_length(o);
38787  if (likely(l >= 0)) {
38788  i += l;
38789  } else {
38790  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
38791  return NULL;
38792  PyErr_Clear();
38793  }
38794  }
38795  return m->sq_item(o, i);
38796  }
38797  }
38798 #else
38799  if (is_list || PySequence_Check(o)) {
38800  return PySequence_GetItem(o, i);
38801  }
38802 #endif
38803  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38804 }
38805 
38806 /* ObjectGetItem */
38807 #if CYTHON_USE_TYPE_SLOTS
38808 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
38809  PyObject *runerr;
38810  Py_ssize_t key_value;
38811  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
38812  if (unlikely(!(m && m->sq_item))) {
38813  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
38814  return NULL;
38815  }
38816  key_value = __Pyx_PyIndex_AsSsize_t(index);
38817  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
38818  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
38819  }
38820  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
38821  PyErr_Clear();
38822  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
38823  }
38824  return NULL;
38825 }
38826 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
38827  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
38828  if (likely(m && m->mp_subscript)) {
38829  return m->mp_subscript(obj, key);
38830  }
38831  return __Pyx_PyObject_GetIndex(obj, key);
38832 }
38833 #endif
38834 
38835 /* decode_c_string */
38836 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
38837  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
38838  const char* encoding, const char* errors,
38839  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
38840  Py_ssize_t length;
38841  if (unlikely((start < 0) | (stop < 0))) {
38842  size_t slen = strlen(cstring);
38843  if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
38844  PyErr_SetString(PyExc_OverflowError,
38845  "c-string too long to convert to Python");
38846  return NULL;
38847  }
38848  length = (Py_ssize_t) slen;
38849  if (start < 0) {
38850  start += length;
38851  if (start < 0)
38852  start = 0;
38853  }
38854  if (stop < 0)
38855  stop += length;
38856  }
38857  length = stop - start;
38858  if (unlikely(length <= 0))
38859  return PyUnicode_FromUnicode(NULL, 0);
38860  cstring += start;
38861  if (decode_func) {
38862  return decode_func(cstring, length, errors);
38863  } else {
38864  return PyUnicode_Decode(cstring, length, encoding, errors);
38865  }
38866 }
38867 
38868 /* GetAttr3 */
38869 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
38870  __Pyx_PyThreadState_declare
38871  __Pyx_PyThreadState_assign
38872  if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
38873  return NULL;
38874  __Pyx_PyErr_Clear();
38875  Py_INCREF(d);
38876  return d;
38877 }
38878 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
38879  PyObject *r = __Pyx_GetAttr(o, n);
38880  return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
38881 }
38882 
38883 /* SwapException */
38884 #if CYTHON_FAST_THREAD_STATE
38885 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
38886  PyObject *tmp_type, *tmp_value, *tmp_tb;
38887  #if CYTHON_USE_EXC_INFO_STACK
38888  _PyErr_StackItem *exc_info = tstate->exc_info;
38889  tmp_type = exc_info->exc_type;
38890  tmp_value = exc_info->exc_value;
38891  tmp_tb = exc_info->exc_traceback;
38892  exc_info->exc_type = *type;
38893  exc_info->exc_value = *value;
38894  exc_info->exc_traceback = *tb;
38895  #else
38896  tmp_type = tstate->exc_type;
38897  tmp_value = tstate->exc_value;
38898  tmp_tb = tstate->exc_traceback;
38899  tstate->exc_type = *type;
38900  tstate->exc_value = *value;
38901  tstate->exc_traceback = *tb;
38902  #endif
38903  *type = tmp_type;
38904  *value = tmp_value;
38905  *tb = tmp_tb;
38906 }
38907 #else
38908 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
38909  PyObject *tmp_type, *tmp_value, *tmp_tb;
38910  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
38911  PyErr_SetExcInfo(*type, *value, *tb);
38912  *type = tmp_type;
38913  *value = tmp_value;
38914  *tb = tmp_tb;
38915 }
38916 #endif
38917 
38918 /* Import */
38919 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
38920  PyObject *empty_list = 0;
38921  PyObject *module = 0;
38922  PyObject *global_dict = 0;
38923  PyObject *empty_dict = 0;
38924  PyObject *list;
38925  #if PY_MAJOR_VERSION < 3
38926  PyObject *py_import;
38927  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
38928  if (!py_import)
38929  goto bad;
38930  #endif
38931  if (from_list)
38932  list = from_list;
38933  else {
38934  empty_list = PyList_New(0);
38935  if (!empty_list)
38936  goto bad;
38937  list = empty_list;
38938  }
38939  global_dict = PyModule_GetDict(__pyx_m);
38940  if (!global_dict)
38941  goto bad;
38942  empty_dict = PyDict_New();
38943  if (!empty_dict)
38944  goto bad;
38945  {
38946  #if PY_MAJOR_VERSION >= 3
38947  if (level == -1) {
38948  if (strchr(__Pyx_MODULE_NAME, '.')) {
38949  module = PyImport_ImportModuleLevelObject(
38950  name, global_dict, empty_dict, list, 1);
38951  if (!module) {
38952  if (!PyErr_ExceptionMatches(PyExc_ImportError))
38953  goto bad;
38954  PyErr_Clear();
38955  }
38956  }
38957  level = 0;
38958  }
38959  #endif
38960  if (!module) {
38961  #if PY_MAJOR_VERSION < 3
38962  PyObject *py_level = PyInt_FromLong(level);
38963  if (!py_level)
38964  goto bad;
38965  module = PyObject_CallFunctionObjArgs(py_import,
38966  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
38967  Py_DECREF(py_level);
38968  #else
38969  module = PyImport_ImportModuleLevelObject(
38970  name, global_dict, empty_dict, list, level);
38971  #endif
38972  }
38973  }
38974 bad:
38975  #if PY_MAJOR_VERSION < 3
38976  Py_XDECREF(py_import);
38977  #endif
38978  Py_XDECREF(empty_list);
38979  Py_XDECREF(empty_dict);
38980  return module;
38981 }
38982 
38983 /* FastTypeChecks */
38984 #if CYTHON_COMPILING_IN_CPYTHON
38985 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
38986  while (a) {
38987  a = a->tp_base;
38988  if (a == b)
38989  return 1;
38990  }
38991  return b == &PyBaseObject_Type;
38992 }
38993 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
38994  PyObject *mro;
38995  if (a == b) return 1;
38996  mro = a->tp_mro;
38997  if (likely(mro)) {
38998  Py_ssize_t i, n;
38999  n = PyTuple_GET_SIZE(mro);
39000  for (i = 0; i < n; i++) {
39001  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
39002  return 1;
39003  }
39004  return 0;
39005  }
39006  return __Pyx_InBases(a, b);
39007 }
39008 #if PY_MAJOR_VERSION == 2
39009 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
39010  PyObject *exception, *value, *tb;
39011  int res;
39012  __Pyx_PyThreadState_declare
39013  __Pyx_PyThreadState_assign
39014  __Pyx_ErrFetch(&exception, &value, &tb);
39015  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
39016  if (unlikely(res == -1)) {
39017  PyErr_WriteUnraisable(err);
39018  res = 0;
39019  }
39020  if (!res) {
39021  res = PyObject_IsSubclass(err, exc_type2);
39022  if (unlikely(res == -1)) {
39023  PyErr_WriteUnraisable(err);
39024  res = 0;
39025  }
39026  }
39027  __Pyx_ErrRestore(exception, value, tb);
39028  return res;
39029 }
39030 #else
39031 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
39032  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
39033  if (!res) {
39034  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
39035  }
39036  return res;
39037 }
39038 #endif
39039 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
39040  Py_ssize_t i, n;
39041  assert(PyExceptionClass_Check(exc_type));
39042  n = PyTuple_GET_SIZE(tuple);
39043 #if PY_MAJOR_VERSION >= 3
39044  for (i=0; i<n; i++) {
39045  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
39046  }
39047 #endif
39048  for (i=0; i<n; i++) {
39049  PyObject *t = PyTuple_GET_ITEM(tuple, i);
39050  #if PY_MAJOR_VERSION < 3
39051  if (likely(exc_type == t)) return 1;
39052  #endif
39053  if (likely(PyExceptionClass_Check(t))) {
39054  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
39055  } else {
39056  }
39057  }
39058  return 0;
39059 }
39060 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
39061  if (likely(err == exc_type)) return 1;
39062  if (likely(PyExceptionClass_Check(err))) {
39063  if (likely(PyExceptionClass_Check(exc_type))) {
39064  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
39065  } else if (likely(PyTuple_Check(exc_type))) {
39066  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
39067  } else {
39068  }
39069  }
39070  return PyErr_GivenExceptionMatches(err, exc_type);
39071 }
39072 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
39073  assert(PyExceptionClass_Check(exc_type1));
39074  assert(PyExceptionClass_Check(exc_type2));
39075  if (likely(err == exc_type1 || err == exc_type2)) return 1;
39076  if (likely(PyExceptionClass_Check(err))) {
39077  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
39078  }
39079  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
39080 }
39081 #endif
39082 
39083 /* PyIntBinop */
39084 #if !CYTHON_COMPILING_IN_PYPY
39085 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
39086  (void)inplace;
39087  (void)zerodivision_check;
39088  #if PY_MAJOR_VERSION < 3
39089  if (likely(PyInt_CheckExact(op1))) {
39090  const long b = intval;
39091  long x;
39092  long a = PyInt_AS_LONG(op1);
39093  x = (long)((unsigned long)a + b);
39094  if (likely((x^a) >= 0 || (x^b) >= 0))
39095  return PyInt_FromLong(x);
39096  return PyLong_Type.tp_as_number->nb_add(op1, op2);
39097  }
39098  #endif
39099  #if CYTHON_USE_PYLONG_INTERNALS
39100  if (likely(PyLong_CheckExact(op1))) {
39101  const long b = intval;
39102  long a, x;
39103 #ifdef HAVE_LONG_LONG
39104  const PY_LONG_LONG llb = intval;
39105  PY_LONG_LONG lla, llx;
39106 #endif
39107  const digit* digits = ((PyLongObject*)op1)->ob_digit;
39108  const Py_ssize_t size = Py_SIZE(op1);
39109  if (likely(__Pyx_sst_abs(size) <= 1)) {
39110  a = likely(size) ? digits[0] : 0;
39111  if (size == -1) a = -a;
39112  } else {
39113  switch (size) {
39114  case -2:
39115  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39116  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39117  break;
39118 #ifdef HAVE_LONG_LONG
39119  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
39120  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39121  goto long_long;
39122 #endif
39123  }
39124  CYTHON_FALLTHROUGH;
39125  case 2:
39126  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39127  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39128  break;
39129 #ifdef HAVE_LONG_LONG
39130  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
39131  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39132  goto long_long;
39133 #endif
39134  }
39135  CYTHON_FALLTHROUGH;
39136  case -3:
39137  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39138  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39139  break;
39140 #ifdef HAVE_LONG_LONG
39141  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
39142  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39143  goto long_long;
39144 #endif
39145  }
39146  CYTHON_FALLTHROUGH;
39147  case 3:
39148  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39149  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39150  break;
39151 #ifdef HAVE_LONG_LONG
39152  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
39153  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39154  goto long_long;
39155 #endif
39156  }
39157  CYTHON_FALLTHROUGH;
39158  case -4:
39159  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39160  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39161  break;
39162 #ifdef HAVE_LONG_LONG
39163  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39164  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39165  goto long_long;
39166 #endif
39167  }
39168  CYTHON_FALLTHROUGH;
39169  case 4:
39170  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39171  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39172  break;
39173 #ifdef HAVE_LONG_LONG
39174  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39175  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39176  goto long_long;
39177 #endif
39178  }
39179  CYTHON_FALLTHROUGH;
39180  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
39181  }
39182  }
39183  x = a + b;
39184  return PyLong_FromLong(x);
39185 #ifdef HAVE_LONG_LONG
39186  long_long:
39187  llx = lla + llb;
39188  return PyLong_FromLongLong(llx);
39189 #endif
39190 
39191 
39192  }
39193  #endif
39194  if (PyFloat_CheckExact(op1)) {
39195  const long b = intval;
39196  double a = PyFloat_AS_DOUBLE(op1);
39197  double result;
39198  PyFPE_START_PROTECT("add", return NULL)
39199  result = ((double)a) + (double)b;
39200  PyFPE_END_PROTECT(result)
39201  return PyFloat_FromDouble(result);
39202  }
39203  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
39204 }
39205 #endif
39206 
39207 /* None */
39208 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
39209  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
39210 }
39211 
39212 /* None */
39213 static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
39214  long q = a / b;
39215  long r = a - q*b;
39216  q -= ((r != 0) & ((r ^ b) < 0));
39217  return q;
39218 }
39219 
39220 /* ImportFrom */
39221 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
39222  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
39223  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
39224  PyErr_Format(PyExc_ImportError,
39225  #if PY_MAJOR_VERSION < 3
39226  "cannot import name %.230s", PyString_AS_STRING(name));
39227  #else
39228  "cannot import name %S", name);
39229  #endif
39230  }
39231  return value;
39232 }
39233 
39234 /* HasAttr */
39235 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
39236  PyObject *r;
39237  if (unlikely(!__Pyx_PyBaseString_Check(n))) {
39238  PyErr_SetString(PyExc_TypeError,
39239  "hasattr(): attribute name must be string");
39240  return -1;
39241  }
39242  r = __Pyx_GetAttr(o, n);
39243  if (unlikely(!r)) {
39244  PyErr_Clear();
39245  return 0;
39246  } else {
39247  Py_DECREF(r);
39248  return 1;
39249  }
39250 }
39251 
39252 /* StringJoin */
39253 #if !CYTHON_COMPILING_IN_CPYTHON
39254 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
39255  return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
39256 }
39257 #endif
39258 
39259 /* PyObject_GenericGetAttrNoDict */
39260 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
39261 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
39262  PyErr_Format(PyExc_AttributeError,
39263 #if PY_MAJOR_VERSION >= 3
39264  "'%.50s' object has no attribute '%U'",
39265  tp->tp_name, attr_name);
39266 #else
39267  "'%.50s' object has no attribute '%.400s'",
39268  tp->tp_name, PyString_AS_STRING(attr_name));
39269 #endif
39270  return NULL;
39271 }
39272 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
39273  PyObject *descr;
39274  PyTypeObject *tp = Py_TYPE(obj);
39275  if (unlikely(!PyString_Check(attr_name))) {
39276  return PyObject_GenericGetAttr(obj, attr_name);
39277  }
39278  assert(!tp->tp_dictoffset);
39279  descr = _PyType_Lookup(tp, attr_name);
39280  if (unlikely(!descr)) {
39281  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
39282  }
39283  Py_INCREF(descr);
39284  #if PY_MAJOR_VERSION < 3
39285  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
39286  #endif
39287  {
39288  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
39289  if (unlikely(f)) {
39290  PyObject *res = f(descr, obj, (PyObject *)tp);
39291  Py_DECREF(descr);
39292  return res;
39293  }
39294  }
39295  return descr;
39296 }
39297 #endif
39298 
39299 /* PyObject_GenericGetAttr */
39300 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
39301 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
39302  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
39303  return PyObject_GenericGetAttr(obj, attr_name);
39304  }
39305  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
39306 }
39307 #endif
39308 
39309 /* SetupReduce */
39310 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
39311  int ret;
39312  PyObject *name_attr;
39313  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
39314  if (likely(name_attr)) {
39315  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
39316  } else {
39317  ret = -1;
39318  }
39319  if (unlikely(ret < 0)) {
39320  PyErr_Clear();
39321  ret = 0;
39322  }
39323  Py_XDECREF(name_attr);
39324  return ret;
39325 }
39326 static int __Pyx_setup_reduce(PyObject* type_obj) {
39327  int ret = 0;
39328  PyObject *object_reduce = NULL;
39329  PyObject *object_reduce_ex = NULL;
39330  PyObject *reduce = NULL;
39331  PyObject *reduce_ex = NULL;
39332  PyObject *reduce_cython = NULL;
39333  PyObject *setstate = NULL;
39334  PyObject *setstate_cython = NULL;
39335 #if CYTHON_USE_PYTYPE_LOOKUP
39336  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
39337 #else
39338  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
39339 #endif
39340 #if CYTHON_USE_PYTYPE_LOOKUP
39341  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
39342 #else
39343  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
39344 #endif
39345  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
39346  if (reduce_ex == object_reduce_ex) {
39347 #if CYTHON_USE_PYTYPE_LOOKUP
39348  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
39349 #else
39350  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
39351 #endif
39352  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
39353  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
39354  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto __PYX_BAD;
39355  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
39356  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
39357  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
39358  if (!setstate) PyErr_Clear();
39359  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
39360  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto __PYX_BAD;
39361  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
39362  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
39363  }
39364  PyType_Modified((PyTypeObject*)type_obj);
39365  }
39366  }
39367  goto __PYX_GOOD;
39368 __PYX_BAD:
39369  if (!PyErr_Occurred())
39370  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
39371  ret = -1;
39372 __PYX_GOOD:
39373 #if !CYTHON_USE_PYTYPE_LOOKUP
39374  Py_XDECREF(object_reduce);
39375  Py_XDECREF(object_reduce_ex);
39376 #endif
39377  Py_XDECREF(reduce);
39378  Py_XDECREF(reduce_ex);
39379  Py_XDECREF(reduce_cython);
39380  Py_XDECREF(setstate);
39381  Py_XDECREF(setstate_cython);
39382  return ret;
39383 }
39384 
39385 /* SetVTable */
39386 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
39387 #if PY_VERSION_HEX >= 0x02070000
39388  PyObject *ob = PyCapsule_New(vtable, 0, 0);
39389 #else
39390  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
39391 #endif
39392  if (!ob)
39393  goto bad;
39394  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
39395  goto bad;
39396  Py_DECREF(ob);
39397  return 0;
39398 bad:
39399  Py_XDECREF(ob);
39400  return -1;
39401 }
39402 
39403 /* TypeImport */
39404 #ifndef __PYX_HAVE_RT_ImportType
39405 #define __PYX_HAVE_RT_ImportType
39406 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
39407  size_t size, enum __Pyx_ImportType_CheckSize check_size)
39408 {
39409  PyObject *result = 0;
39410  char warning[200];
39411  Py_ssize_t basicsize;
39412 #ifdef Py_LIMITED_API
39413  PyObject *py_basicsize;
39414 #endif
39415  result = PyObject_GetAttrString(module, class_name);
39416  if (!result)
39417  goto bad;
39418  if (!PyType_Check(result)) {
39419  PyErr_Format(PyExc_TypeError,
39420  "%.200s.%.200s is not a type object",
39421  module_name, class_name);
39422  goto bad;
39423  }
39424 #ifndef Py_LIMITED_API
39425  basicsize = ((PyTypeObject *)result)->tp_basicsize;
39426 #else
39427  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
39428  if (!py_basicsize)
39429  goto bad;
39430  basicsize = PyLong_AsSsize_t(py_basicsize);
39431  Py_DECREF(py_basicsize);
39432  py_basicsize = 0;
39433  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
39434  goto bad;
39435 #endif
39436  if ((size_t)basicsize < size) {
39437  PyErr_Format(PyExc_ValueError,
39438  "%.200s.%.200s size changed, may indicate binary incompatibility. "
39439  "Expected %zd from C header, got %zd from PyObject",
39440  module_name, class_name, size, basicsize);
39441  goto bad;
39442  }
39443  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
39444  PyErr_Format(PyExc_ValueError,
39445  "%.200s.%.200s size changed, may indicate binary incompatibility. "
39446  "Expected %zd from C header, got %zd from PyObject",
39447  module_name, class_name, size, basicsize);
39448  goto bad;
39449  }
39450  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
39451  PyOS_snprintf(warning, sizeof(warning),
39452  "%s.%s size changed, may indicate binary incompatibility. "
39453  "Expected %zd from C header, got %zd from PyObject",
39454  module_name, class_name, size, basicsize);
39455  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
39456  }
39457  return (PyTypeObject *)result;
39458 bad:
39459  Py_XDECREF(result);
39460  return NULL;
39461 }
39462 #endif
39463 
39464 /* CLineInTraceback */
39465 #ifndef CYTHON_CLINE_IN_TRACEBACK
39466 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
39467  PyObject *use_cline;
39468  PyObject *ptype, *pvalue, *ptraceback;
39469 #if CYTHON_COMPILING_IN_CPYTHON
39470  PyObject **cython_runtime_dict;
39471 #endif
39472  if (unlikely(!__pyx_cython_runtime)) {
39473  return c_line;
39474  }
39475  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
39476 #if CYTHON_COMPILING_IN_CPYTHON
39477  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
39478  if (likely(cython_runtime_dict)) {
39479  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
39480  use_cline, *cython_runtime_dict,
39481  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
39482  } else
39483 #endif
39484  {
39485  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
39486  if (use_cline_obj) {
39487  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
39488  Py_DECREF(use_cline_obj);
39489  } else {
39490  PyErr_Clear();
39491  use_cline = NULL;
39492  }
39493  }
39494  if (!use_cline) {
39495  c_line = 0;
39496  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
39497  }
39498  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
39499  c_line = 0;
39500  }
39501  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
39502  return c_line;
39503 }
39504 #endif
39505 
39506 /* CodeObjectCache */
39507 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
39508  int start = 0, mid = 0, end = count - 1;
39509  if (end >= 0 && code_line > entries[end].code_line) {
39510  return count;
39511  }
39512  while (start < end) {
39513  mid = start + (end - start) / 2;
39514  if (code_line < entries[mid].code_line) {
39515  end = mid;
39516  } else if (code_line > entries[mid].code_line) {
39517  start = mid + 1;
39518  } else {
39519  return mid;
39520  }
39521  }
39522  if (code_line <= entries[mid].code_line) {
39523  return mid;
39524  } else {
39525  return mid + 1;
39526  }
39527 }
39528 static PyCodeObject *__pyx_find_code_object(int code_line) {
39529  PyCodeObject* code_object;
39530  int pos;
39531  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
39532  return NULL;
39533  }
39534  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
39535  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
39536  return NULL;
39537  }
39538  code_object = __pyx_code_cache.entries[pos].code_object;
39539  Py_INCREF(code_object);
39540  return code_object;
39541 }
39542 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
39543  int pos, i;
39544  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
39545  if (unlikely(!code_line)) {
39546  return;
39547  }
39548  if (unlikely(!entries)) {
39549  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
39550  if (likely(entries)) {
39551  __pyx_code_cache.entries = entries;
39552  __pyx_code_cache.max_count = 64;
39553  __pyx_code_cache.count = 1;
39554  entries[0].code_line = code_line;
39555  entries[0].code_object = code_object;
39556  Py_INCREF(code_object);
39557  }
39558  return;
39559  }
39560  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
39561  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
39562  PyCodeObject* tmp = entries[pos].code_object;
39563  entries[pos].code_object = code_object;
39564  Py_DECREF(tmp);
39565  return;
39566  }
39567  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
39568  int new_max = __pyx_code_cache.max_count + 64;
39569  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
39570  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
39571  if (unlikely(!entries)) {
39572  return;
39573  }
39574  __pyx_code_cache.entries = entries;
39575  __pyx_code_cache.max_count = new_max;
39576  }
39577  for (i=__pyx_code_cache.count; i>pos; i--) {
39578  entries[i] = entries[i-1];
39579  }
39580  entries[pos].code_line = code_line;
39581  entries[pos].code_object = code_object;
39582  __pyx_code_cache.count++;
39583  Py_INCREF(code_object);
39584 }
39585 
39586 /* AddTraceback */
39587 #include "compile.h"
39588 #include "frameobject.h"
39589 #include "traceback.h"
39590 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
39591  const char *funcname, int c_line,
39592  int py_line, const char *filename) {
39593  PyCodeObject *py_code = 0;
39594  PyObject *py_srcfile = 0;
39595  PyObject *py_funcname = 0;
39596  #if PY_MAJOR_VERSION < 3
39597  py_srcfile = PyString_FromString(filename);
39598  #else
39599  py_srcfile = PyUnicode_FromString(filename);
39600  #endif
39601  if (!py_srcfile) goto bad;
39602  if (c_line) {
39603  #if PY_MAJOR_VERSION < 3
39604  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
39605  #else
39606  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
39607  #endif
39608  }
39609  else {
39610  #if PY_MAJOR_VERSION < 3
39611  py_funcname = PyString_FromString(funcname);
39612  #else
39613  py_funcname = PyUnicode_FromString(funcname);
39614  #endif
39615  }
39616  if (!py_funcname) goto bad;
39617  py_code = __Pyx_PyCode_New(
39618  0,
39619  0,
39620  0,
39621  0,
39622  0,
39623  __pyx_empty_bytes, /*PyObject *code,*/
39624  __pyx_empty_tuple, /*PyObject *consts,*/
39625  __pyx_empty_tuple, /*PyObject *names,*/
39626  __pyx_empty_tuple, /*PyObject *varnames,*/
39627  __pyx_empty_tuple, /*PyObject *freevars,*/
39628  __pyx_empty_tuple, /*PyObject *cellvars,*/
39629  py_srcfile, /*PyObject *filename,*/
39630  py_funcname, /*PyObject *name,*/
39631  py_line,
39632  __pyx_empty_bytes /*PyObject *lnotab*/
39633  );
39634  Py_DECREF(py_srcfile);
39635  Py_DECREF(py_funcname);
39636  return py_code;
39637 bad:
39638  Py_XDECREF(py_srcfile);
39639  Py_XDECREF(py_funcname);
39640  return NULL;
39641 }
39642 static void __Pyx_AddTraceback(const char *funcname, int c_line,
39643  int py_line, const char *filename) {
39644  PyCodeObject *py_code = 0;
39645  PyFrameObject *py_frame = 0;
39646  PyThreadState *tstate = __Pyx_PyThreadState_Current;
39647  if (c_line) {
39648  c_line = __Pyx_CLineForTraceback(tstate, c_line);
39649  }
39650  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
39651  if (!py_code) {
39652  py_code = __Pyx_CreateCodeObjectForTraceback(
39653  funcname, c_line, py_line, filename);
39654  if (!py_code) goto bad;
39655  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
39656  }
39657  py_frame = PyFrame_New(
39658  tstate, /*PyThreadState *tstate,*/
39659  py_code, /*PyCodeObject *code,*/
39660  __pyx_d, /*PyObject *globals,*/
39661  0 /*PyObject *locals*/
39662  );
39663  if (!py_frame) goto bad;
39664  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
39665  PyTraceBack_Here(py_frame);
39666 bad:
39667  Py_XDECREF(py_code);
39668  Py_XDECREF(py_frame);
39669 }
39670 
39671 /* CIntFromPyVerify */
39672 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
39673  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
39674 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
39675  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
39676 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
39677  {\
39678  func_type value = func_value;\
39679  if (sizeof(target_type) < sizeof(func_type)) {\
39680  if (unlikely(value != (func_type) (target_type) value)) {\
39681  func_type zero = 0;\
39682  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
39683  return (target_type) -1;\
39684  if (is_unsigned && unlikely(value < zero))\
39685  goto raise_neg_overflow;\
39686  else\
39687  goto raise_overflow;\
39688  }\
39689  }\
39690  return (target_type) value;\
39691  }
39692 
39693 /* CIntToPy */
39694 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
39695  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
39696  const int is_unsigned = neg_one > const_zero;
39697  if (is_unsigned) {
39698  if (sizeof(int) < sizeof(long)) {
39699  return PyInt_FromLong((long) value);
39700  } else if (sizeof(int) <= sizeof(unsigned long)) {
39701  return PyLong_FromUnsignedLong((unsigned long) value);
39702 #ifdef HAVE_LONG_LONG
39703  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
39704  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
39705 #endif
39706  }
39707  } else {
39708  if (sizeof(int) <= sizeof(long)) {
39709  return PyInt_FromLong((long) value);
39710 #ifdef HAVE_LONG_LONG
39711  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
39712  return PyLong_FromLongLong((PY_LONG_LONG) value);
39713 #endif
39714  }
39715  }
39716  {
39717  int one = 1; int little = (int)*(unsigned char *)&one;
39718  unsigned char *bytes = (unsigned char *)&value;
39719  return _PyLong_FromByteArray(bytes, sizeof(int),
39720  little, !is_unsigned);
39721  }
39722 }
39723 
39724 /* MemviewDtypeToObject */
39725 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp) {
39726  return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp);
39727 }
39728 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj) {
39729  int value = __Pyx_PyInt_As_int(obj);
39730  if ((value == (int)-1) && PyErr_Occurred())
39731  return 0;
39732  *(int *) itemp = value;
39733  return 1;
39734 }
39735 
39736 /* MemviewDtypeToObject */
39737 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
39738  return (PyObject *) PyFloat_FromDouble(*(double *) itemp);
39739 }
39740 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) {
39741  double value = __pyx_PyFloat_AsDouble(obj);
39742  if ((value == (double)-1) && PyErr_Occurred())
39743  return 0;
39744  *(double *) itemp = value;
39745  return 1;
39746 }
39747 
39748 /* Print */
39749 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
39750 static PyObject *__Pyx_GetStdout(void) {
39751  PyObject *f = PySys_GetObject((char *)"stdout");
39752  if (!f) {
39753  PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
39754  }
39755  return f;
39756 }
39757 static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
39758  int i;
39759  if (!f) {
39760  if (!(f = __Pyx_GetStdout()))
39761  return -1;
39762  }
39763  Py_INCREF(f);
39764  for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
39765  PyObject* v;
39766  if (PyFile_SoftSpace(f, 1)) {
39767  if (PyFile_WriteString(" ", f) < 0)
39768  goto error;
39769  }
39770  v = PyTuple_GET_ITEM(arg_tuple, i);
39771  if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
39772  goto error;
39773  if (PyString_Check(v)) {
39774  char *s = PyString_AsString(v);
39775  Py_ssize_t len = PyString_Size(v);
39776  if (len > 0) {
39777  switch (s[len-1]) {
39778  case ' ': break;
39779  case '\f': case '\r': case '\n': case '\t': case '\v':
39780  PyFile_SoftSpace(f, 0);
39781  break;
39782  default: break;
39783  }
39784  }
39785  }
39786  }
39787  if (newline) {
39788  if (PyFile_WriteString("\n", f) < 0)
39789  goto error;
39790  PyFile_SoftSpace(f, 0);
39791  }
39792  Py_DECREF(f);
39793  return 0;
39794 error:
39795  Py_DECREF(f);
39796  return -1;
39797 }
39798 #else
39799 static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
39800  PyObject* kwargs = 0;
39801  PyObject* result = 0;
39802  PyObject* end_string;
39803  if (unlikely(!__pyx_print)) {
39804  __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
39805  if (!__pyx_print)
39806  return -1;
39807  }
39808  if (stream) {
39809  kwargs = PyDict_New();
39810  if (unlikely(!kwargs))
39811  return -1;
39812  if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
39813  goto bad;
39814  if (!newline) {
39815  end_string = PyUnicode_FromStringAndSize(" ", 1);
39816  if (unlikely(!end_string))
39817  goto bad;
39818  if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
39819  Py_DECREF(end_string);
39820  goto bad;
39821  }
39822  Py_DECREF(end_string);
39823  }
39824  } else if (!newline) {
39825  if (unlikely(!__pyx_print_kwargs)) {
39826  __pyx_print_kwargs = PyDict_New();
39827  if (unlikely(!__pyx_print_kwargs))
39828  return -1;
39829  end_string = PyUnicode_FromStringAndSize(" ", 1);
39830  if (unlikely(!end_string))
39831  return -1;
39832  if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
39833  Py_DECREF(end_string);
39834  return -1;
39835  }
39836  Py_DECREF(end_string);
39837  }
39838  kwargs = __pyx_print_kwargs;
39839  }
39840  result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
39841  if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
39842  Py_DECREF(kwargs);
39843  if (!result)
39844  return -1;
39845  Py_DECREF(result);
39846  return 0;
39847 bad:
39848  if (kwargs != __pyx_print_kwargs)
39849  Py_XDECREF(kwargs);
39850  return -1;
39851 }
39852 #endif
39853 
39854 /* Declarations */
39855 #if CYTHON_CCOMPLEX
39856  #ifdef __cplusplus
39857  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39858  return ::std::complex< float >(x, y);
39859  }
39860  #else
39861  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39862  return x + y*(__pyx_t_float_complex)_Complex_I;
39863  }
39864  #endif
39865 #else
39866  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39867  __pyx_t_float_complex z;
39868  z.real = x;
39869  z.imag = y;
39870  return z;
39871  }
39872 #endif
39873 
39874 /* Arithmetic */
39875 #if CYTHON_CCOMPLEX
39876 #else
39877  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39878  return (a.real == b.real) && (a.imag == b.imag);
39879  }
39880  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39881  __pyx_t_float_complex z;
39882  z.real = a.real + b.real;
39883  z.imag = a.imag + b.imag;
39884  return z;
39885  }
39886  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39887  __pyx_t_float_complex z;
39888  z.real = a.real - b.real;
39889  z.imag = a.imag - b.imag;
39890  return z;
39891  }
39892  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39893  __pyx_t_float_complex z;
39894  z.real = a.real * b.real - a.imag * b.imag;
39895  z.imag = a.real * b.imag + a.imag * b.real;
39896  return z;
39897  }
39898  #if 1
39899  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39900  if (b.imag == 0) {
39901  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39902  } else if (fabsf(b.real) >= fabsf(b.imag)) {
39903  if (b.real == 0 && b.imag == 0) {
39904  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
39905  } else {
39906  float r = b.imag / b.real;
39907  float s = (float)(1.0) / (b.real + b.imag * r);
39908  return __pyx_t_float_complex_from_parts(
39909  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39910  }
39911  } else {
39912  float r = b.real / b.imag;
39913  float s = (float)(1.0) / (b.imag + b.real * r);
39914  return __pyx_t_float_complex_from_parts(
39915  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39916  }
39917  }
39918  #else
39919  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39920  if (b.imag == 0) {
39921  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39922  } else {
39923  float denom = b.real * b.real + b.imag * b.imag;
39924  return __pyx_t_float_complex_from_parts(
39925  (a.real * b.real + a.imag * b.imag) / denom,
39926  (a.imag * b.real - a.real * b.imag) / denom);
39927  }
39928  }
39929  #endif
39930  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
39931  __pyx_t_float_complex z;
39932  z.real = -a.real;
39933  z.imag = -a.imag;
39934  return z;
39935  }
39936  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
39937  return (a.real == 0) && (a.imag == 0);
39938  }
39939  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
39940  __pyx_t_float_complex z;
39941  z.real = a.real;
39942  z.imag = -a.imag;
39943  return z;
39944  }
39945  #if 1
39946  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
39947  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39948  return sqrtf(z.real*z.real + z.imag*z.imag);
39949  #else
39950  return hypotf(z.real, z.imag);
39951  #endif
39952  }
39953  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39954  __pyx_t_float_complex z;
39955  float r, lnr, theta, z_r, z_theta;
39956  if (b.imag == 0 && b.real == (int)b.real) {
39957  if (b.real < 0) {
39958  float denom = a.real * a.real + a.imag * a.imag;
39959  a.real = a.real / denom;
39960  a.imag = -a.imag / denom;
39961  b.real = -b.real;
39962  }
39963  switch ((int)b.real) {
39964  case 0:
39965  z.real = 1;
39966  z.imag = 0;
39967  return z;
39968  case 1:
39969  return a;
39970  case 2:
39971  return __Pyx_c_prod_float(a, a);
39972  case 3:
39973  z = __Pyx_c_prod_float(a, a);
39974  return __Pyx_c_prod_float(z, a);
39975  case 4:
39976  z = __Pyx_c_prod_float(a, a);
39977  return __Pyx_c_prod_float(z, z);
39978  }
39979  }
39980  if (a.imag == 0) {
39981  if (a.real == 0) {
39982  return a;
39983  } else if (b.imag == 0) {
39984  z.real = powf(a.real, b.real);
39985  z.imag = 0;
39986  return z;
39987  } else if (a.real > 0) {
39988  r = a.real;
39989  theta = 0;
39990  } else {
39991  r = -a.real;
39992  theta = atan2f(0.0, -1.0);
39993  }
39994  } else {
39995  r = __Pyx_c_abs_float(a);
39996  theta = atan2f(a.imag, a.real);
39997  }
39998  lnr = logf(r);
39999  z_r = expf(lnr * b.real - theta * b.imag);
40000  z_theta = theta * b.real + lnr * b.imag;
40001  z.real = z_r * cosf(z_theta);
40002  z.imag = z_r * sinf(z_theta);
40003  return z;
40004  }
40005  #endif
40006 #endif
40007 
40008 /* Declarations */
40009 #if CYTHON_CCOMPLEX
40010  #ifdef __cplusplus
40011  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
40012  return ::std::complex< double >(x, y);
40013  }
40014  #else
40015  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
40016  return x + y*(__pyx_t_double_complex)_Complex_I;
40017  }
40018  #endif
40019 #else
40020  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
40021  __pyx_t_double_complex z;
40022  z.real = x;
40023  z.imag = y;
40024  return z;
40025  }
40026 #endif
40027 
40028 /* Arithmetic */
40029 #if CYTHON_CCOMPLEX
40030 #else
40031  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
40032  return (a.real == b.real) && (a.imag == b.imag);
40033  }
40034  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
40035  __pyx_t_double_complex z;
40036  z.real = a.real + b.real;
40037  z.imag = a.imag + b.imag;
40038  return z;
40039  }
40040  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
40041  __pyx_t_double_complex z;
40042  z.real = a.real - b.real;
40043  z.imag = a.imag - b.imag;
40044  return z;
40045  }
40046  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
40047  __pyx_t_double_complex z;
40048  z.real = a.real * b.real - a.imag * b.imag;
40049  z.imag = a.real * b.imag + a.imag * b.real;
40050  return z;
40051  }
40052  #if 1
40053  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
40054  if (b.imag == 0) {
40055  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
40056  } else if (fabs(b.real) >= fabs(b.imag)) {
40057  if (b.real == 0 && b.imag == 0) {
40058  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
40059  } else {
40060  double r = b.imag / b.real;
40061  double s = (double)(1.0) / (b.real + b.imag * r);
40062  return __pyx_t_double_complex_from_parts(
40063  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
40064  }
40065  } else {
40066  double r = b.real / b.imag;
40067  double s = (double)(1.0) / (b.imag + b.real * r);
40068  return __pyx_t_double_complex_from_parts(
40069  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
40070  }
40071  }
40072  #else
40073  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
40074  if (b.imag == 0) {
40075  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
40076  } else {
40077  double denom = b.real * b.real + b.imag * b.imag;
40078  return __pyx_t_double_complex_from_parts(
40079  (a.real * b.real + a.imag * b.imag) / denom,
40080  (a.imag * b.real - a.real * b.imag) / denom);
40081  }
40082  }
40083  #endif
40084  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
40085  __pyx_t_double_complex z;
40086  z.real = -a.real;
40087  z.imag = -a.imag;
40088  return z;
40089  }
40090  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
40091  return (a.real == 0) && (a.imag == 0);
40092  }
40093  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
40094  __pyx_t_double_complex z;
40095  z.real = a.real;
40096  z.imag = -a.imag;
40097  return z;
40098  }
40099  #if 1
40100  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
40101  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
40102  return sqrt(z.real*z.real + z.imag*z.imag);
40103  #else
40104  return hypot(z.real, z.imag);
40105  #endif
40106  }
40107  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
40108  __pyx_t_double_complex z;
40109  double r, lnr, theta, z_r, z_theta;
40110  if (b.imag == 0 && b.real == (int)b.real) {
40111  if (b.real < 0) {
40112  double denom = a.real * a.real + a.imag * a.imag;
40113  a.real = a.real / denom;
40114  a.imag = -a.imag / denom;
40115  b.real = -b.real;
40116  }
40117  switch ((int)b.real) {
40118  case 0:
40119  z.real = 1;
40120  z.imag = 0;
40121  return z;
40122  case 1:
40123  return a;
40124  case 2:
40125  return __Pyx_c_prod_double(a, a);
40126  case 3:
40127  z = __Pyx_c_prod_double(a, a);
40128  return __Pyx_c_prod_double(z, a);
40129  case 4:
40130  z = __Pyx_c_prod_double(a, a);
40131  return __Pyx_c_prod_double(z, z);
40132  }
40133  }
40134  if (a.imag == 0) {
40135  if (a.real == 0) {
40136  return a;
40137  } else if (b.imag == 0) {
40138  z.real = pow(a.real, b.real);
40139  z.imag = 0;
40140  return z;
40141  } else if (a.real > 0) {
40142  r = a.real;
40143  theta = 0;
40144  } else {
40145  r = -a.real;
40146  theta = atan2(0.0, -1.0);
40147  }
40148  } else {
40149  r = __Pyx_c_abs_double(a);
40150  theta = atan2(a.imag, a.real);
40151  }
40152  lnr = log(r);
40153  z_r = exp(lnr * b.real - theta * b.imag);
40154  z_theta = theta * b.real + lnr * b.imag;
40155  z.real = z_r * cos(z_theta);
40156  z.imag = z_r * sin(z_theta);
40157  return z;
40158  }
40159  #endif
40160 #endif
40161 
40162 /* CIntToPy */
40163 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
40164  const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
40165  const int is_unsigned = neg_one > const_zero;
40166  if (is_unsigned) {
40167  if (sizeof(enum NPY_TYPES) < sizeof(long)) {
40168  return PyInt_FromLong((long) value);
40169  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
40170  return PyLong_FromUnsignedLong((unsigned long) value);
40171 #ifdef HAVE_LONG_LONG
40172  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
40173  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40174 #endif
40175  }
40176  } else {
40177  if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
40178  return PyInt_FromLong((long) value);
40179 #ifdef HAVE_LONG_LONG
40180  } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
40181  return PyLong_FromLongLong((PY_LONG_LONG) value);
40182 #endif
40183  }
40184  }
40185  {
40186  int one = 1; int little = (int)*(unsigned char *)&one;
40187  unsigned char *bytes = (unsigned char *)&value;
40188  return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
40189  little, !is_unsigned);
40190  }
40191 }
40192 
40193 #if PY_MAJOR_VERSION < 3
40194 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
40195  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
40196  if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
40197  if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
40198  if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
40199  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
40200  return -1;
40201 }
40202 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
40203  PyObject *obj = view->obj;
40204  if (!obj) return;
40205  if (PyObject_CheckBuffer(obj)) {
40206  PyBuffer_Release(view);
40207  return;
40208  }
40209  if ((0)) {}
40210  else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
40211  view->obj = NULL;
40212  Py_DECREF(obj);
40213 }
40214 #endif
40215 
40216 
40217 /* MemviewSliceIsContig */
40218 static int
40219 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
40220 {
40221  int i, index, step, start;
40222  Py_ssize_t itemsize = mvs.memview->view.itemsize;
40223  if (order == 'F') {
40224  step = 1;
40225  start = 0;
40226  } else {
40227  step = -1;
40228  start = ndim - 1;
40229  }
40230  for (i = 0; i < ndim; i++) {
40231  index = start + step * i;
40232  if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
40233  return 0;
40234  itemsize *= mvs.shape[index];
40235  }
40236  return 1;
40237 }
40238 
40239 /* OverlappingSlices */
40240 static void
40241 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
40242  void **out_start, void **out_end,
40243  int ndim, size_t itemsize)
40244 {
40245  char *start, *end;
40246  int i;
40247  start = end = slice->data;
40248  for (i = 0; i < ndim; i++) {
40249  Py_ssize_t stride = slice->strides[i];
40250  Py_ssize_t extent = slice->shape[i];
40251  if (extent == 0) {
40252  *out_start = *out_end = start;
40253  return;
40254  } else {
40255  if (stride > 0)
40256  end += stride * (extent - 1);
40257  else
40258  start += stride * (extent - 1);
40259  }
40260  }
40261  *out_start = start;
40262  *out_end = end + itemsize;
40263 }
40264 static int
40265 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
40266  __Pyx_memviewslice *slice2,
40267  int ndim, size_t itemsize)
40268 {
40269  void *start1, *end1, *start2, *end2;
40270  __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
40271  __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
40272  return (start1 < end2) && (start2 < end1);
40273 }
40274 
40275 /* Capsule */
40276 static CYTHON_INLINE PyObject *
40277 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
40278 {
40279  PyObject *cobj;
40280 #if PY_VERSION_HEX >= 0x02070000
40281  cobj = PyCapsule_New(p, sig, NULL);
40282 #else
40283  cobj = PyCObject_FromVoidPtr(p, NULL);
40284 #endif
40285  return cobj;
40286 }
40287 
40288 /* CIntFromPy */
40289 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
40290  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
40291  const int is_unsigned = neg_one > const_zero;
40292 #if PY_MAJOR_VERSION < 3
40293  if (likely(PyInt_Check(x))) {
40294  if (sizeof(int) < sizeof(long)) {
40295  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
40296  } else {
40297  long val = PyInt_AS_LONG(x);
40298  if (is_unsigned && unlikely(val < 0)) {
40299  goto raise_neg_overflow;
40300  }
40301  return (int) val;
40302  }
40303  } else
40304 #endif
40305  if (likely(PyLong_Check(x))) {
40306  if (is_unsigned) {
40307 #if CYTHON_USE_PYLONG_INTERNALS
40308  const digit* digits = ((PyLongObject*)x)->ob_digit;
40309  switch (Py_SIZE(x)) {
40310  case 0: return (int) 0;
40311  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
40312  case 2:
40313  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
40314  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40315  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40316  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
40317  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40318  }
40319  }
40320  break;
40321  case 3:
40322  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
40323  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40324  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40325  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
40326  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40327  }
40328  }
40329  break;
40330  case 4:
40331  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
40332  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40333  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40334  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
40335  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40336  }
40337  }
40338  break;
40339  }
40340 #endif
40341 #if CYTHON_COMPILING_IN_CPYTHON
40342  if (unlikely(Py_SIZE(x) < 0)) {
40343  goto raise_neg_overflow;
40344  }
40345 #else
40346  {
40347  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40348  if (unlikely(result < 0))
40349  return (int) -1;
40350  if (unlikely(result == 1))
40351  goto raise_neg_overflow;
40352  }
40353 #endif
40354  if (sizeof(int) <= sizeof(unsigned long)) {
40355  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
40356 #ifdef HAVE_LONG_LONG
40357  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
40358  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40359 #endif
40360  }
40361  } else {
40362 #if CYTHON_USE_PYLONG_INTERNALS
40363  const digit* digits = ((PyLongObject*)x)->ob_digit;
40364  switch (Py_SIZE(x)) {
40365  case 0: return (int) 0;
40366  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
40367  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
40368  case -2:
40369  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
40370  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40371  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40372  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
40373  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40374  }
40375  }
40376  break;
40377  case 2:
40378  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
40379  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40380  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40381  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
40382  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40383  }
40384  }
40385  break;
40386  case -3:
40387  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
40388  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40389  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40390  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
40391  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40392  }
40393  }
40394  break;
40395  case 3:
40396  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
40397  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40398  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40399  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
40400  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40401  }
40402  }
40403  break;
40404  case -4:
40405  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
40406  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40407  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40408  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
40409  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40410  }
40411  }
40412  break;
40413  case 4:
40414  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
40415  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40416  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40417  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
40418  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40419  }
40420  }
40421  break;
40422  }
40423 #endif
40424  if (sizeof(int) <= sizeof(long)) {
40425  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
40426 #ifdef HAVE_LONG_LONG
40427  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
40428  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
40429 #endif
40430  }
40431  }
40432  {
40433 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40434  PyErr_SetString(PyExc_RuntimeError,
40435  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40436 #else
40437  int val;
40438  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40439  #if PY_MAJOR_VERSION < 3
40440  if (likely(v) && !PyLong_Check(v)) {
40441  PyObject *tmp = v;
40442  v = PyNumber_Long(tmp);
40443  Py_DECREF(tmp);
40444  }
40445  #endif
40446  if (likely(v)) {
40447  int one = 1; int is_little = (int)*(unsigned char *)&one;
40448  unsigned char *bytes = (unsigned char *)&val;
40449  int ret = _PyLong_AsByteArray((PyLongObject *)v,
40450  bytes, sizeof(val),
40451  is_little, !is_unsigned);
40452  Py_DECREF(v);
40453  if (likely(!ret))
40454  return val;
40455  }
40456 #endif
40457  return (int) -1;
40458  }
40459  } else {
40460  int val;
40461  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40462  if (!tmp) return (int) -1;
40463  val = __Pyx_PyInt_As_int(tmp);
40464  Py_DECREF(tmp);
40465  return val;
40466  }
40467 raise_overflow:
40468  PyErr_SetString(PyExc_OverflowError,
40469  "value too large to convert to int");
40470  return (int) -1;
40471 raise_neg_overflow:
40472  PyErr_SetString(PyExc_OverflowError,
40473  "can't convert negative value to int");
40474  return (int) -1;
40475 }
40476 
40477 /* TypeInfoToFormat */
40478 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) {
40479  struct __pyx_typeinfo_string result = { {0} };
40480  char *buf = (char *) result.string;
40481  size_t size = type->size;
40482  switch (type->typegroup) {
40483  case 'H':
40484  *buf = 'c';
40485  break;
40486  case 'I':
40487  case 'U':
40488  if (size == 1)
40489  *buf = (type->is_unsigned) ? 'B' : 'b';
40490  else if (size == 2)
40491  *buf = (type->is_unsigned) ? 'H' : 'h';
40492  else if (size == 4)
40493  *buf = (type->is_unsigned) ? 'I' : 'i';
40494  else if (size == 8)
40495  *buf = (type->is_unsigned) ? 'Q' : 'q';
40496  break;
40497  case 'P':
40498  *buf = 'P';
40499  break;
40500  case 'C':
40501  {
40502  __Pyx_TypeInfo complex_type = *type;
40503  complex_type.typegroup = 'R';
40504  complex_type.size /= 2;
40505  *buf++ = 'Z';
40506  *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0];
40507  break;
40508  }
40509  case 'R':
40510  if (size == 4)
40511  *buf = 'f';
40512  else if (size == 8)
40513  *buf = 'd';
40514  else
40515  *buf = 'g';
40516  break;
40517  }
40518  return result;
40519 }
40520 
40521 /* PrintOne */
40522 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
40523 static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
40524  if (!f) {
40525  if (!(f = __Pyx_GetStdout()))
40526  return -1;
40527  }
40528  Py_INCREF(f);
40529  if (PyFile_SoftSpace(f, 0)) {
40530  if (PyFile_WriteString(" ", f) < 0)
40531  goto error;
40532  }
40533  if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
40534  goto error;
40535  if (PyFile_WriteString("\n", f) < 0)
40536  goto error;
40537  Py_DECREF(f);
40538  return 0;
40539 error:
40540  Py_DECREF(f);
40541  return -1;
40542  /* the line below is just to avoid C compiler
40543  * warnings about unused functions */
40544  return __Pyx_Print(f, NULL, 0);
40545 }
40546 #else
40547 static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
40548  int res;
40549  PyObject* arg_tuple = PyTuple_Pack(1, o);
40550  if (unlikely(!arg_tuple))
40551  return -1;
40552  res = __Pyx_Print(stream, arg_tuple, 1);
40553  Py_DECREF(arg_tuple);
40554  return res;
40555 }
40556 #endif
40557 
40558 /* MemviewSliceCopyTemplate */
40559 static __Pyx_memviewslice
40560 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
40561  const char *mode, int ndim,
40562  size_t sizeof_dtype, int contig_flag,
40563  int dtype_is_object)
40564 {
40565  __Pyx_RefNannyDeclarations
40566  int i;
40567  __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
40568  struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
40569  Py_buffer *buf = &from_memview->view;
40570  PyObject *shape_tuple = NULL;
40571  PyObject *temp_int = NULL;
40572  struct __pyx_array_obj *array_obj = NULL;
40573  struct __pyx_memoryview_obj *memview_obj = NULL;
40574  __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
40575  for (i = 0; i < ndim; i++) {
40576  if (from_mvs->suboffsets[i] >= 0) {
40577  PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
40578  "indirect dimensions (axis %d)", i);
40579  goto fail;
40580  }
40581  }
40582  shape_tuple = PyTuple_New(ndim);
40583  if (unlikely(!shape_tuple)) {
40584  goto fail;
40585  }
40586  __Pyx_GOTREF(shape_tuple);
40587  for(i = 0; i < ndim; i++) {
40588  temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
40589  if(unlikely(!temp_int)) {
40590  goto fail;
40591  } else {
40592  PyTuple_SET_ITEM(shape_tuple, i, temp_int);
40593  temp_int = NULL;
40594  }
40595  }
40596  array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
40597  if (unlikely(!array_obj)) {
40598  goto fail;
40599  }
40600  __Pyx_GOTREF(array_obj);
40601  memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
40602  (PyObject *) array_obj, contig_flag,
40603  dtype_is_object,
40604  from_mvs->memview->typeinfo);
40605  if (unlikely(!memview_obj))
40606  goto fail;
40607  if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
40608  goto fail;
40609  if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
40610  dtype_is_object) < 0))
40611  goto fail;
40612  goto no_fail;
40613 fail:
40614  __Pyx_XDECREF(new_mvs.memview);
40615  new_mvs.memview = NULL;
40616  new_mvs.data = NULL;
40617 no_fail:
40618  __Pyx_XDECREF(shape_tuple);
40619  __Pyx_XDECREF(temp_int);
40620  __Pyx_XDECREF(array_obj);
40621  __Pyx_RefNannyFinishContext();
40622  return new_mvs;
40623 }
40624 
40625 /* MemviewSliceInit */
40626 static int
40627 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
40628  int ndim,
40629  __Pyx_memviewslice *memviewslice,
40630  int memview_is_new_reference)
40631 {
40632  __Pyx_RefNannyDeclarations
40633  int i, retval=-1;
40634  Py_buffer *buf = &memview->view;
40635  __Pyx_RefNannySetupContext("init_memviewslice", 0);
40636  if (memviewslice->memview || memviewslice->data) {
40637  PyErr_SetString(PyExc_ValueError,
40638  "memviewslice is already initialized!");
40639  goto fail;
40640  }
40641  if (buf->strides) {
40642  for (i = 0; i < ndim; i++) {
40643  memviewslice->strides[i] = buf->strides[i];
40644  }
40645  } else {
40646  Py_ssize_t stride = buf->itemsize;
40647  for (i = ndim - 1; i >= 0; i--) {
40648  memviewslice->strides[i] = stride;
40649  stride *= buf->shape[i];
40650  }
40651  }
40652  for (i = 0; i < ndim; i++) {
40653  memviewslice->shape[i] = buf->shape[i];
40654  if (buf->suboffsets) {
40655  memviewslice->suboffsets[i] = buf->suboffsets[i];
40656  } else {
40657  memviewslice->suboffsets[i] = -1;
40658  }
40659  }
40660  memviewslice->memview = memview;
40661  memviewslice->data = (char *)buf->buf;
40662  if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
40663  Py_INCREF(memview);
40664  }
40665  retval = 0;
40666  goto no_fail;
40667 fail:
40668  memviewslice->memview = 0;
40669  memviewslice->data = 0;
40670  retval = -1;
40671 no_fail:
40672  __Pyx_RefNannyFinishContext();
40673  return retval;
40674 }
40675 #ifndef Py_NO_RETURN
40676 #define Py_NO_RETURN
40677 #endif
40678 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
40679  va_list vargs;
40680  char msg[200];
40681 #ifdef HAVE_STDARG_PROTOTYPES
40682  va_start(vargs, fmt);
40683 #else
40684  va_start(vargs);
40685 #endif
40686  vsnprintf(msg, 200, fmt, vargs);
40687  va_end(vargs);
40688  Py_FatalError(msg);
40689 }
40690 static CYTHON_INLINE int
40691 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
40692  PyThread_type_lock lock)
40693 {
40694  int result;
40695  PyThread_acquire_lock(lock, 1);
40696  result = (*acquisition_count)++;
40697  PyThread_release_lock(lock);
40698  return result;
40699 }
40700 static CYTHON_INLINE int
40701 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
40702  PyThread_type_lock lock)
40703 {
40704  int result;
40705  PyThread_acquire_lock(lock, 1);
40706  result = (*acquisition_count)--;
40707  PyThread_release_lock(lock);
40708  return result;
40709 }
40710 static CYTHON_INLINE void
40711 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
40712 {
40713  int first_time;
40714  struct __pyx_memoryview_obj *memview = memslice->memview;
40715  if (!memview || (PyObject *) memview == Py_None)
40716  return;
40717  if (__pyx_get_slice_count(memview) < 0)
40718  __pyx_fatalerror("Acquisition count is %d (line %d)",
40719  __pyx_get_slice_count(memview), lineno);
40720  first_time = __pyx_add_acquisition_count(memview) == 0;
40721  if (first_time) {
40722  if (have_gil) {
40723  Py_INCREF((PyObject *) memview);
40724  } else {
40725  PyGILState_STATE _gilstate = PyGILState_Ensure();
40726  Py_INCREF((PyObject *) memview);
40727  PyGILState_Release(_gilstate);
40728  }
40729  }
40730 }
40731 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
40732  int have_gil, int lineno) {
40733  int last_time;
40734  struct __pyx_memoryview_obj *memview = memslice->memview;
40735  if (!memview ) {
40736  return;
40737  } else if ((PyObject *) memview == Py_None) {
40738  memslice->memview = NULL;
40739  return;
40740  }
40741  if (__pyx_get_slice_count(memview) <= 0)
40742  __pyx_fatalerror("Acquisition count is %d (line %d)",
40743  __pyx_get_slice_count(memview), lineno);
40744  last_time = __pyx_sub_acquisition_count(memview) == 1;
40745  memslice->data = NULL;
40746  if (last_time) {
40747  if (have_gil) {
40748  Py_CLEAR(memslice->memview);
40749  } else {
40750  PyGILState_STATE _gilstate = PyGILState_Ensure();
40751  Py_CLEAR(memslice->memview);
40752  PyGILState_Release(_gilstate);
40753  }
40754  } else {
40755  memslice->memview = NULL;
40756  }
40757 }
40758 
40759 /* CIntFromPy */
40760 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
40761  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
40762  const int is_unsigned = neg_one > const_zero;
40763 #if PY_MAJOR_VERSION < 3
40764  if (likely(PyInt_Check(x))) {
40765  if (sizeof(long) < sizeof(long)) {
40766  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
40767  } else {
40768  long val = PyInt_AS_LONG(x);
40769  if (is_unsigned && unlikely(val < 0)) {
40770  goto raise_neg_overflow;
40771  }
40772  return (long) val;
40773  }
40774  } else
40775 #endif
40776  if (likely(PyLong_Check(x))) {
40777  if (is_unsigned) {
40778 #if CYTHON_USE_PYLONG_INTERNALS
40779  const digit* digits = ((PyLongObject*)x)->ob_digit;
40780  switch (Py_SIZE(x)) {
40781  case 0: return (long) 0;
40782  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
40783  case 2:
40784  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
40785  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40786  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40787  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
40788  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40789  }
40790  }
40791  break;
40792  case 3:
40793  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
40794  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40795  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40796  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
40797  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40798  }
40799  }
40800  break;
40801  case 4:
40802  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
40803  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40804  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40805  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
40806  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40807  }
40808  }
40809  break;
40810  }
40811 #endif
40812 #if CYTHON_COMPILING_IN_CPYTHON
40813  if (unlikely(Py_SIZE(x) < 0)) {
40814  goto raise_neg_overflow;
40815  }
40816 #else
40817  {
40818  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40819  if (unlikely(result < 0))
40820  return (long) -1;
40821  if (unlikely(result == 1))
40822  goto raise_neg_overflow;
40823  }
40824 #endif
40825  if (sizeof(long) <= sizeof(unsigned long)) {
40826  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
40827 #ifdef HAVE_LONG_LONG
40828  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40829  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40830 #endif
40831  }
40832  } else {
40833 #if CYTHON_USE_PYLONG_INTERNALS
40834  const digit* digits = ((PyLongObject*)x)->ob_digit;
40835  switch (Py_SIZE(x)) {
40836  case 0: return (long) 0;
40837  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
40838  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
40839  case -2:
40840  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
40841  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40842  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40843  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40844  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40845  }
40846  }
40847  break;
40848  case 2:
40849  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
40850  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40851  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40852  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40853  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40854  }
40855  }
40856  break;
40857  case -3:
40858  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40859  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40860  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40861  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40862  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40863  }
40864  }
40865  break;
40866  case 3:
40867  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
40868  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40869  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40870  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40871  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40872  }
40873  }
40874  break;
40875  case -4:
40876  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40877  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40878  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40879  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
40880  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40881  }
40882  }
40883  break;
40884  case 4:
40885  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
40886  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40887  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40888  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
40889  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40890  }
40891  }
40892  break;
40893  }
40894 #endif
40895  if (sizeof(long) <= sizeof(long)) {
40896  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
40897 #ifdef HAVE_LONG_LONG
40898  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40899  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
40900 #endif
40901  }
40902  }
40903  {
40904 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40905  PyErr_SetString(PyExc_RuntimeError,
40906  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40907 #else
40908  long val;
40909  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40910  #if PY_MAJOR_VERSION < 3
40911  if (likely(v) && !PyLong_Check(v)) {
40912  PyObject *tmp = v;
40913  v = PyNumber_Long(tmp);
40914  Py_DECREF(tmp);
40915  }
40916  #endif
40917  if (likely(v)) {
40918  int one = 1; int is_little = (int)*(unsigned char *)&one;
40919  unsigned char *bytes = (unsigned char *)&val;
40920  int ret = _PyLong_AsByteArray((PyLongObject *)v,
40921  bytes, sizeof(val),
40922  is_little, !is_unsigned);
40923  Py_DECREF(v);
40924  if (likely(!ret))
40925  return val;
40926  }
40927 #endif
40928  return (long) -1;
40929  }
40930  } else {
40931  long val;
40932  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40933  if (!tmp) return (long) -1;
40934  val = __Pyx_PyInt_As_long(tmp);
40935  Py_DECREF(tmp);
40936  return val;
40937  }
40938 raise_overflow:
40939  PyErr_SetString(PyExc_OverflowError,
40940  "value too large to convert to long");
40941  return (long) -1;
40942 raise_neg_overflow:
40943  PyErr_SetString(PyExc_OverflowError,
40944  "can't convert negative value to long");
40945  return (long) -1;
40946 }
40947 
40948 /* CIntToPy */
40949 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
40950  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
40951  const int is_unsigned = neg_one > const_zero;
40952  if (is_unsigned) {
40953  if (sizeof(long) < sizeof(long)) {
40954  return PyInt_FromLong((long) value);
40955  } else if (sizeof(long) <= sizeof(unsigned long)) {
40956  return PyLong_FromUnsignedLong((unsigned long) value);
40957 #ifdef HAVE_LONG_LONG
40958  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40959  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40960 #endif
40961  }
40962  } else {
40963  if (sizeof(long) <= sizeof(long)) {
40964  return PyInt_FromLong((long) value);
40965 #ifdef HAVE_LONG_LONG
40966  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40967  return PyLong_FromLongLong((PY_LONG_LONG) value);
40968 #endif
40969  }
40970  }
40971  {
40972  int one = 1; int little = (int)*(unsigned char *)&one;
40973  unsigned char *bytes = (unsigned char *)&value;
40974  return _PyLong_FromByteArray(bytes, sizeof(long),
40975  little, !is_unsigned);
40976  }
40977 }
40978 
40979 /* CIntFromPy */
40980 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
40981  const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
40982  const int is_unsigned = neg_one > const_zero;
40983 #if PY_MAJOR_VERSION < 3
40984  if (likely(PyInt_Check(x))) {
40985  if (sizeof(char) < sizeof(long)) {
40986  __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
40987  } else {
40988  long val = PyInt_AS_LONG(x);
40989  if (is_unsigned && unlikely(val < 0)) {
40990  goto raise_neg_overflow;
40991  }
40992  return (char) val;
40993  }
40994  } else
40995 #endif
40996  if (likely(PyLong_Check(x))) {
40997  if (is_unsigned) {
40998 #if CYTHON_USE_PYLONG_INTERNALS
40999  const digit* digits = ((PyLongObject*)x)->ob_digit;
41000  switch (Py_SIZE(x)) {
41001  case 0: return (char) 0;
41002  case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
41003  case 2:
41004  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
41005  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41006  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41007  } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
41008  return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
41009  }
41010  }
41011  break;
41012  case 3:
41013  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
41014  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41015  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41016  } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
41017  return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
41018  }
41019  }
41020  break;
41021  case 4:
41022  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
41023  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41024  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41025  } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
41026  return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
41027  }
41028  }
41029  break;
41030  }
41031 #endif
41032 #if CYTHON_COMPILING_IN_CPYTHON
41033  if (unlikely(Py_SIZE(x) < 0)) {
41034  goto raise_neg_overflow;
41035  }
41036 #else
41037  {
41038  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
41039  if (unlikely(result < 0))
41040  return (char) -1;
41041  if (unlikely(result == 1))
41042  goto raise_neg_overflow;
41043  }
41044 #endif
41045  if (sizeof(char) <= sizeof(unsigned long)) {
41046  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
41047 #ifdef HAVE_LONG_LONG
41048  } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
41049  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
41050 #endif
41051  }
41052  } else {
41053 #if CYTHON_USE_PYLONG_INTERNALS
41054  const digit* digits = ((PyLongObject*)x)->ob_digit;
41055  switch (Py_SIZE(x)) {
41056  case 0: return (char) 0;
41057  case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
41058  case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
41059  case -2:
41060  if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
41061  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41062  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41063  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
41064  return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41065  }
41066  }
41067  break;
41068  case 2:
41069  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
41070  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41071  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41072  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
41073  return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41074  }
41075  }
41076  break;
41077  case -3:
41078  if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
41079  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41080  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41081  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
41082  return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41083  }
41084  }
41085  break;
41086  case 3:
41087  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
41088  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41089  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41090  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
41091  return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41092  }
41093  }
41094  break;
41095  case -4:
41096  if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
41097  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41098  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41099  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
41100  return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41101  }
41102  }
41103  break;
41104  case 4:
41105  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
41106  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41107  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41108  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
41109  return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41110  }
41111  }
41112  break;
41113  }
41114 #endif
41115  if (sizeof(char) <= sizeof(long)) {
41116  __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
41117 #ifdef HAVE_LONG_LONG
41118  } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
41119  __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
41120 #endif
41121  }
41122  }
41123  {
41124 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
41125  PyErr_SetString(PyExc_RuntimeError,
41126  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
41127 #else
41128  char val;
41129  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
41130  #if PY_MAJOR_VERSION < 3
41131  if (likely(v) && !PyLong_Check(v)) {
41132  PyObject *tmp = v;
41133  v = PyNumber_Long(tmp);
41134  Py_DECREF(tmp);
41135  }
41136  #endif
41137  if (likely(v)) {
41138  int one = 1; int is_little = (int)*(unsigned char *)&one;
41139  unsigned char *bytes = (unsigned char *)&val;
41140  int ret = _PyLong_AsByteArray((PyLongObject *)v,
41141  bytes, sizeof(val),
41142  is_little, !is_unsigned);
41143  Py_DECREF(v);
41144  if (likely(!ret))
41145  return val;
41146  }
41147 #endif
41148  return (char) -1;
41149  }
41150  } else {
41151  char val;
41152  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
41153  if (!tmp) return (char) -1;
41154  val = __Pyx_PyInt_As_char(tmp);
41155  Py_DECREF(tmp);
41156  return val;
41157  }
41158 raise_overflow:
41159  PyErr_SetString(PyExc_OverflowError,
41160  "value too large to convert to char");
41161  return (char) -1;
41162 raise_neg_overflow:
41163  PyErr_SetString(PyExc_OverflowError,
41164  "can't convert negative value to char");
41165  return (char) -1;
41166 }
41167 
41168 /* CheckBinaryVersion */
41169 static int __Pyx_check_binary_version(void) {
41170  char ctversion[4], rtversion[4];
41171  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
41172  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
41173  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
41174  char message[200];
41175  PyOS_snprintf(message, sizeof(message),
41176  "compiletime version %s of module '%.100s' "
41177  "does not match runtime version %s",
41178  ctversion, __Pyx_MODULE_NAME, rtversion);
41179  return PyErr_WarnEx(NULL, message, 1);
41180  }
41181  return 0;
41182 }
41183 
41184 /* InitStrings */
41185 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
41186  while (t->p) {
41187  #if PY_MAJOR_VERSION < 3
41188  if (t->is_unicode) {
41189  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
41190  } else if (t->intern) {
41191  *t->p = PyString_InternFromString(t->s);
41192  } else {
41193  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
41194  }
41195  #else
41196  if (t->is_unicode | t->is_str) {
41197  if (t->intern) {
41198  *t->p = PyUnicode_InternFromString(t->s);
41199  } else if (t->encoding) {
41200  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
41201  } else {
41202  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
41203  }
41204  } else {
41205  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
41206  }
41207  #endif
41208  if (!*t->p)
41209  return -1;
41210  if (PyObject_Hash(*t->p) == -1)
41211  return -1;
41212  ++t;
41213  }
41214  return 0;
41215 }
41216 
41217 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
41218  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
41219 }
41220 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
41221  Py_ssize_t ignore;
41222  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
41223 }
41224 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
41225 #if !CYTHON_PEP393_ENABLED
41226 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41227  char* defenc_c;
41228  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
41229  if (!defenc) return NULL;
41230  defenc_c = PyBytes_AS_STRING(defenc);
41231 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41232  {
41233  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
41234  char* c;
41235  for (c = defenc_c; c < end; c++) {
41236  if ((unsigned char) (*c) >= 128) {
41237  PyUnicode_AsASCIIString(o);
41238  return NULL;
41239  }
41240  }
41241  }
41242 #endif
41243  *length = PyBytes_GET_SIZE(defenc);
41244  return defenc_c;
41245 }
41246 #else
41247 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41248  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
41249 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41250  if (likely(PyUnicode_IS_ASCII(o))) {
41251  *length = PyUnicode_GET_LENGTH(o);
41252  return PyUnicode_AsUTF8(o);
41253  } else {
41254  PyUnicode_AsASCIIString(o);
41255  return NULL;
41256  }
41257 #else
41258  return PyUnicode_AsUTF8AndSize(o, length);
41259 #endif
41260 }
41261 #endif
41262 #endif
41263 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41264 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
41265  if (
41266 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41267  __Pyx_sys_getdefaultencoding_not_ascii &&
41268 #endif
41269  PyUnicode_Check(o)) {
41270  return __Pyx_PyUnicode_AsStringAndSize(o, length);
41271  } else
41272 #endif
41273 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
41274  if (PyByteArray_Check(o)) {
41275  *length = PyByteArray_GET_SIZE(o);
41276  return PyByteArray_AS_STRING(o);
41277  } else
41278 #endif
41279  {
41280  char* result;
41281  int r = PyBytes_AsStringAndSize(o, &result, length);
41282  if (unlikely(r < 0)) {
41283  return NULL;
41284  } else {
41285  return result;
41286  }
41287  }
41288 }
41289 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
41290  int is_true = x == Py_True;
41291  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
41292  else return PyObject_IsTrue(x);
41293 }
41294 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
41295  int retval;
41296  if (unlikely(!x)) return -1;
41297  retval = __Pyx_PyObject_IsTrue(x);
41298  Py_DECREF(x);
41299  return retval;
41300 }
41301 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
41302 #if PY_MAJOR_VERSION >= 3
41303  if (PyLong_Check(result)) {
41304  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
41305  "__int__ returned non-int (type %.200s). "
41306  "The ability to return an instance of a strict subclass of int "
41307  "is deprecated, and may be removed in a future version of Python.",
41308  Py_TYPE(result)->tp_name)) {
41309  Py_DECREF(result);
41310  return NULL;
41311  }
41312  return result;
41313  }
41314 #endif
41315  PyErr_Format(PyExc_TypeError,
41316  "__%.4s__ returned non-%.4s (type %.200s)",
41317  type_name, type_name, Py_TYPE(result)->tp_name);
41318  Py_DECREF(result);
41319  return NULL;
41320 }
41321 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
41322 #if CYTHON_USE_TYPE_SLOTS
41323  PyNumberMethods *m;
41324 #endif
41325  const char *name = NULL;
41326  PyObject *res = NULL;
41327 #if PY_MAJOR_VERSION < 3
41328  if (likely(PyInt_Check(x) || PyLong_Check(x)))
41329 #else
41330  if (likely(PyLong_Check(x)))
41331 #endif
41332  return __Pyx_NewRef(x);
41333 #if CYTHON_USE_TYPE_SLOTS
41334  m = Py_TYPE(x)->tp_as_number;
41335  #if PY_MAJOR_VERSION < 3
41336  if (m && m->nb_int) {
41337  name = "int";
41338  res = m->nb_int(x);
41339  }
41340  else if (m && m->nb_long) {
41341  name = "long";
41342  res = m->nb_long(x);
41343  }
41344  #else
41345  if (likely(m && m->nb_int)) {
41346  name = "int";
41347  res = m->nb_int(x);
41348  }
41349  #endif
41350 #else
41351  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
41352  res = PyNumber_Int(x);
41353  }
41354 #endif
41355  if (likely(res)) {
41356 #if PY_MAJOR_VERSION < 3
41357  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
41358 #else
41359  if (unlikely(!PyLong_CheckExact(res))) {
41360 #endif
41361  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
41362  }
41363  }
41364  else if (!PyErr_Occurred()) {
41365  PyErr_SetString(PyExc_TypeError,
41366  "an integer is required");
41367  }
41368  return res;
41369 }
41370 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
41371  Py_ssize_t ival;
41372  PyObject *x;
41373 #if PY_MAJOR_VERSION < 3
41374  if (likely(PyInt_CheckExact(b))) {
41375  if (sizeof(Py_ssize_t) >= sizeof(long))
41376  return PyInt_AS_LONG(b);
41377  else
41378  return PyInt_AsSsize_t(b);
41379  }
41380 #endif
41381  if (likely(PyLong_CheckExact(b))) {
41382  #if CYTHON_USE_PYLONG_INTERNALS
41383  const digit* digits = ((PyLongObject*)b)->ob_digit;
41384  const Py_ssize_t size = Py_SIZE(b);
41385  if (likely(__Pyx_sst_abs(size) <= 1)) {
41386  ival = likely(size) ? digits[0] : 0;
41387  if (size == -1) ival = -ival;
41388  return ival;
41389  } else {
41390  switch (size) {
41391  case 2:
41392  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
41393  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41394  }
41395  break;
41396  case -2:
41397  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
41398  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41399  }
41400  break;
41401  case 3:
41402  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
41403  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41404  }
41405  break;
41406  case -3:
41407  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
41408  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41409  }
41410  break;
41411  case 4:
41412  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
41413  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41414  }
41415  break;
41416  case -4:
41417  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
41418  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41419  }
41420  break;
41421  }
41422  }
41423  #endif
41424  return PyLong_AsSsize_t(b);
41425  }
41426  x = PyNumber_Index(b);
41427  if (!x) return -1;
41428  ival = PyInt_AsSsize_t(x);
41429  Py_DECREF(x);
41430  return ival;
41431 }
41432 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
41433  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
41434 }
41435 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
41436  return PyInt_FromSize_t(ival);
41437 }
41438 
41439 
41440 #endif /* Py_PYTHON_H */
Double c
Definition: Headers.h:53
int regularQuadrilateralMeshElements(const int &nx, const int &ny, Mesh &mesh)
Definition: mesh.cpp:471
double sigmaMax
Definition: mesh.h:70
int * elementBoundaryNodesArray
Definition: mesh.h:42
int nInteriorElementBoundaries_global
Definition: mesh.h:30
int nx
Definition: mesh.h:63
int constructElementBoundaryElementsArray_hexahedron(Mesh &mesh)
Definition: mesh.cpp:1251
int constructElementBoundaryElementsArray_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:1076
int * nodeElementOffsets
Definition: mesh.h:42
Double f
Definition: Headers.h:53
double pos(double a)
double * weights
Definition: mesh.h:61
int * exteriorElementBoundariesArray
Definition: mesh.h:42
Double * z
Definition: Headers.h:40
int regularHexahedralToTetrahedralMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:416
int computeGeometricInfo_NURBS(Mesh &mesh)
Definition: mesh.cpp:3681
int globallyRefineTetrahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4198
int * interiorElementBoundariesArray
Definition: mesh.h:42
int readHex(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5602
int allocateGeometricInfo_triangle(Mesh &mesh)
Definition: mesh.cpp:3688
int computeGeometricInfo_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:3798
int nNodes_element
Definition: mesh.h:30
int computeGeometricInfo_edge(Mesh &mesh)
Definition: mesh.cpp:3870
int * edgeNodesArray
Definition: mesh.h:42
int assignElementBoundaryMaterialTypesFromParent(Mesh &parentMesh, Mesh &childMesh, const int *levelElementParentsArray, const int &nSpace_global)
Definition: mesh.cpp:4502
int regularMeshNodes2D(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:378
double * nodeArray
Definition: mesh.h:67
int readTriangleElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:5005
Int n
Definition: Headers.h:27
int writeTriangleMesh(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:4975
int regularHexahedralToTetrahedralMeshElements(const int &nx, const int &ny, const int &nz, Mesh &mesh)
Definition: mesh.cpp:197
double * nodeDiametersArray
Definition: mesh.h:69
double volume
Definition: mesh.h:70
Double s
Definition: Headers.h:53
int computeGeometricInfo_hexahedron(Mesh &mesh)
Definition: mesh.cpp:3595
double hMin
Definition: mesh.h:70
int allocateNodeAndElementNodeDataStructures(Mesh &mesh, int nElements_global, int nNodes_global, int nNodes_element)
Definition: mesh.cpp:3939
int allocateGeometricInfo_NURBS(Mesh &mesh)
Definition: mesh.cpp:3675
int pz
Definition: mesh.h:64
int locallyRefineTriangleMesh_4T(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:6667
int read3DM(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5435
int readTetgenMesh(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5063
int regularHexahedralMeshElements(const int &nx, const int &ny, const int &nz, const int &px, const int &py, const int &pz, Mesh &mesh)
Definition: mesh.cpp:429
double * elementBoundaryBarycentersArray
Definition: mesh.h:68
int nElementBoundaries_element
Definition: mesh.h:30
int readTriangleMesh(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:4915
int setNewestNodeBasesToLongestEdge(MultilevelMesh &multilevelMesh)
Definition: mesh.cpp:6128
int readTetgenElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5122
int regularMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:331
int allocateGeometricInfo_hexahedron(Mesh &mesh)
Definition: mesh.cpp:3583
int ny
Definition: mesh.h:63
int locallyRefineEdgeMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:5799
int constructElementBoundaryElementsArray_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:907
int px
Definition: mesh.h:64
int * nodeStarOffsets
Definition: mesh.h:42
double h
Definition: mesh.h:70
int regularQuadrilateralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:326
int max_nNodeNeighbors_node
Definition: mesh.h:30
int nNodes_elementBoundary
Definition: mesh.h:30
int regularHexahedralToTetrahedralElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:232
int write3dmMesh(Mesh &mesh, const char *filebase, int adhIndexBase)
Definition: mesh.cpp:5715
int write2dmMesh(Mesh &mesh, const char *filebase, int adhIndexBase)
Definition: mesh.cpp:5735
int * elementBoundaryMaterialTypes
Definition: mesh.h:42
int computeGeometricInfo_triangle(Mesh &mesh)
Definition: mesh.cpp:3700
int nEdges_global
Definition: mesh.h:30
Double u
Definition: Headers.h:53
int globallyRefineTriangularMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4054
int nElementBoundaries_global
Definition: mesh.h:30
int nLevels
Definition: mesh.h:259
double * elementBarycentersArray
Definition: mesh.h:68
int regularRectangularToTriangularElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:139
double * elementInnerDiametersArray
Definition: mesh.h:67
int * elementBoundariesArray
Definition: mesh.h:42
int nElements_global
Definition: mesh.h:30
Definition: mesh.h:27
int read2DM(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5519
int constructElementBoundaryElementsArray_edge(Mesh &mesh)
Definition: mesh.cpp:580
int allocateGeometricInfo_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:3788
int * elementMaterialTypes
Definition: mesh.h:42
int * elementBoundaryLocalElementBoundariesArray
Definition: mesh.h:42
double * W_KNOT
Definition: mesh.h:62
int allocateGeometricInfo_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:3469
int * nodeStarArray
Definition: mesh.h:42
int computeGeometricInfo_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:3481
Double L
Definition: Headers.h:53
int writeTetgenMesh(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5400
int allocateGeometricInfo_edge(Mesh &mesh)
Definition: mesh.cpp:3858
int py
Definition: mesh.h:64
int regularHexahedralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:276
int globallyRefineQuadrilateralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4179
int nNodes_global
Definition: mesh.h:30
int globallyRefineHexahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4483
double * elementBoundaryDiametersArray
Definition: mesh.h:67
int constructElementBoundaryElementsArray_triangle(Mesh &mesh)
Definition: mesh.cpp:738
int nz
Definition: mesh.h:63
int regularEdgeMeshNodes(const int &nx, const double &Lx, Mesh &mesh)
Definition: mesh.cpp:73
void initializeMesh(Mesh &mesh)
Definition: mesh.h:87
int locallyRefineTriangleMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:5949
double * U_KNOT
Definition: mesh.h:62
double * V_KNOT
Definition: mesh.h:62
double * elementDiametersArray
Definition: mesh.h:67
int * nodeMaterialTypes
Definition: mesh.h:42
int globallyRefineEdgeMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:3959
int edgeMeshElements(const int &nx, Mesh &mesh)
Definition: mesh.cpp:59
double * nodeSupportArray
Definition: mesh.h:69
int * nodeElementsArray
Definition: mesh.h:42
int * elementNodesArray
Definition: mesh.h:42
int * elementBoundaryElementsArray
Definition: mesh.h:42
Double q
Definition: Headers.h:53
int nExteriorElementBoundaries_global
Definition: mesh.h:30
int regularRectangularToTriangularMeshNodes(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:166
int max_nElements_node
Definition: mesh.h:30
int regularRectangularToTriangularMeshElements(const int &nx, const int &ny, Mesh &mesh, int triangleFlag)
Definition: mesh.cpp:88
int readBC(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5677
Double v
Definition: Headers.h:53
Double r
Definition: Headers.h:53
Double T
Definition: Headers.h:53
int * elementNeighborsArray
Definition: mesh.h:42
int locallyRefineTriangleMesh_redGreen(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:6156
Double U
Definition: Headers.h:53
int * elementIJK
Definition: mesh.h:60